自定义事件
Dim a As New System.Windows.Forms.Button
AddHandler a.Click, AddressOf a_Click
Private Sub a_Click(ByVal sender As Object, ByVal e As System.EventArgs)
MsgBox("OK")
End Sub
控件的Invoke方法
1 Text_ServerPathName.Invoke(New ShowSrvName_Delegate(AddressOf ShowSrvName), minSrvID)
Sub ShowSrvName(ByVal minSrvID As Integer)
MsgBox(minSrvID)
End Sub
2 ListBox_Log.Invoke(CType(AddressOf Add_db, MethodInvoker))
Private Sub Add_db()
MsgBox("Hello")
End Sub