Adding a Callback Event Handler in VB.NET
- Dim “WithEvents”
Dim WithEvents ftp As Chilkat.Ftp2
- Add some code to create a new instance of the object.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ftp = New Chilkat.Ftp2() ftp.EnableEvents = True ftp.HeartbeatMs = 100 ... - Select the “ftp” object.

- Select the event. This causes Visual Studio to generate the event handler function.

- Add your application code to the event handler function.
Private Sub ftp_OnAbortCheck(ByVal sender As Object, ByVal args As Chilkat.AbortCheckEventArgs) Handles ftp.OnAbortCheck ' Add your application code here... End Sub
admin
0
Tags :