VB 自定义事件和处理

Public Class Form1  
    Private Sub Service_Synchr(ByVal index As Integer)  
        ' 处理事件  
    End Sub  
  
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ' 将方法指定到事件  
        AddHandler Service_SynchrEvent, AddressOf Service_Synchr
    End Sub  
End Class  

 

posted @ 2019-05-22 17:58  forack  阅读(515)  评论(0编辑  收藏  举报