Yesterday, I wrote a multi-threaded program. The main role is TCP Tong Xun's applet, which uses multi-threaded technology, encountering an interesting question: I am calling a form in the working thread, let it display it. . Such as form1 f = new form1 (); f.show (); this code is not a matter of time. But in the working thread, you can't turn over. My FORM1 can't move on the desktop. What nor does it respond. It's a bit like a state of a fake crash. Later, I put Form1 F; this code was placed in the main thread and instantiated, everything is normal. (It is estimated that the reason why the work thread is reviewed. "When the program is running, we have already opened a thread, the UI thread. And the general work, such as the new window, button event, this is Under the jurisdiction of the UI thread. And if we create a new thread, when this thread needs to call a new window, it is not possible to call directly under this new thread, but need to let the UI thread call the new window. What new threads do is to send a message to the UI thread to open the window. And do this, we need to use Delegate technology. If the handler and operation of a control is not in the same thread, you need to use the control name. Invoke method code snippet as follows: // Working thread The code will directly call the FormShow method defined under FormShown () {// This It is a free thread. Can't call a form forshow (); // ok} DELEGATE VOID FORMHANDLER (DataSet DS); // Declare a delegate // definition This method is used to display a form private void forshow (DataSet DS) { If (! this.invokerequired) // If the current thread is not the primary UI thread, return true, otherwise, return false. {frMbills fb = new frMbills (); fb.show (); fb.display (ds);} else { FormHandler Fhandler = New formHandler (this.formshow); // Create a new instance point to FormShow. This.invoke (fhandler, new object [] {ds}); // Start DELEGATE}