Public Sub TreeViewEx1_AfterSelect(sender As Object, e As TreeViewEventArgs)
Select Case e.Node.Text.Trim()
Case "测试一", "测试二"
MessageBox.Show(e.Node.Text.Trim())
End Select
End Sub
全局代码
AddHandler TreeViewEx1.AfterSelect, AddressOf TreeViewEx1_AfterSelect
---------------------------
错误
---------------------------
编译错误:“AfterSelect”不是“Object”的事件。
错误代码:AddHandler TreeViewEx1.AfterSelect, AddressOf TreeViewEx1_AfterSelect
---------------------------
确定
---------------------------