Add contacts directly to the TreeView control in the thread

xiaoxiao2021-03-06  106

Public void myaddnode () {treeview1.nodes.add ("test");}

Public void addnode () {methodinvoker mi = new methodinvoker (this.myaddnode); this.beginInvoke (mi); thread.sleep (5000); // only for debug}

THREAD THDADDNODE = New ThreadStart (this.addNode); twaddnode.start (); twaddnode.join ();

转载请注明原文地址:https://www.9cbs.com/read-100915.html

New Post(0)