Hi The following code gives me an error, which I am not too sure about how to fix. Can anyone help please?
Code:
Public Event hw As EventHandler
Private Sub view_hw(sender As Object, eventArgs As Object)
If hw IsNot Nothing Then
hw.Invoke(Me, New EventArgs())
End If
End Sub
Error:
Error 1 'Public Event hw(sender As Object, e As System.EventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
Public Event hw As EventHandler
Private Sub view_hw(sender As Object, eventArgs As Object)
RaiseEvent hw(Me, New EventArgs())
End Sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.