Private Sub TreeView1_Expand(ByVal Node As MSComctlLib.Node)
Node.ExpandedImage = 2 ''节点被展开时,选择索引为2的图像
End Sub
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
MsgBox "您选择的是:“" & TreeView1.Nodes(I).FullPath & "”子节点!"
''系统提示
End If
Next I
End If
End Sub