J
JamesB
I want progress on my ftp upload, so I am trying to add an event.
All the FTP stuff is in its own class (FTPClient). In the class header I
have:
Public Event SendProgress(ByVal bytes As Integer)
and in the upload loop I have:
RaiseEvent SendProgress(TotalBytes)
In the forms part of the app, I have:
Public WithEvents FTPClient As FTPClient
and
Private Sub FTPClient_SendProgress(ByVal bytes As Integer) Handles
FTPClient.SendProgress
'occurs when send thingy receives event.
'do stuff here to tell the user what's happening
End Sub
however it doesn't work. If I step through the code, when I get tto the
raiseevent line in the loop nothing branches off or happens. What am I
missing; it's my first attempt at my own events!
Thanks
James.
All the FTP stuff is in its own class (FTPClient). In the class header I
have:
Public Event SendProgress(ByVal bytes As Integer)
and in the upload loop I have:
RaiseEvent SendProgress(TotalBytes)
In the forms part of the app, I have:
Public WithEvents FTPClient As FTPClient
and
Private Sub FTPClient_SendProgress(ByVal bytes As Integer) Handles
FTPClient.SendProgress
'occurs when send thingy receives event.
'do stuff here to tell the user what's happening
End Sub
however it doesn't work. If I step through the code, when I get tto the
raiseevent line in the loop nothing branches off or happens. What am I
missing; it's my first attempt at my own events!
Thanks
James.