internal BasicObject(BasicForm form1) { form1_ = form1; }
// *** public static void Spawn(IBasicThreadCollection basicthreadcollection, string FileName) { // *** Threads: example // Create a new BasicForm (contains a BasicIdeCtl control) BasicForm form1 = new BasicForm(basicthreadcollection); // Attach the new form to the collection and use it's IBasicThread implementation form1.basicIdeCtl1.AttachBasicThread(form1); // Create a new thread Thread thread = new Thread(new ThreadStart(form1.ThreadProc)); // Must be a single threaded apartment thread.SetApartmentState(ApartmentState.STA); // Start the thread thread.Start(); // Run the script in the new thread form1.Spawn_(FileName); // *** }