控件只能夠?yàn)橹骶程 所有 所以只能夠
如下實(shí)現(xiàn)
System.Threading.Thread myThread1 ;
delegate void AddNodeDelegate();
myThread1 = new System.Threading.Thread(new System.Threading.ThreadStart(threadone));
void threadone()
{
this.tree.Invoke(new AddNodeDelegate(test);
}
private void test()
{
TreeNode node2 = tree.Nodes.Add("計(jì)算機(jī)");
olecon.Open();
treefull(node2);
olecon.Close();
}
private void treefull(TreeNode treeNode)
{//遞歸過(guò)程
}
這樣就OK了