急用!!!怎样把form1窗体中treeview中被选中的节点的值传给form2窗体中的textbox
展开全部
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
If TreeView1.SelectedItem.Children = 0 Then '检查是否有子节点,0为无
For I = 1 To TreeView1.Nodes.Count
If TreeView1.Nodes(I).Selected Then
form2.text1.text=TreeView1.Nodes(I).Text
End If
Next I
End If
End Sub
If TreeView1.SelectedItem.Children = 0 Then '检查是否有子节点,0为无
For I = 1 To TreeView1.Nodes.Count
If TreeView1.Nodes(I).Selected Then
form2.text1.text=TreeView1.Nodes(I).Text
End If
Next I
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询