I did a search in the forum but nothing seemed to work for me.
Where I want to call the event :
Public Class Test
Inherits System.Windows.Forms.UserControl
Public Event TestEvent()
Private sub initPage()
RaiseEvent TestEvent()
End sub
End Class
Where I tell the event what to do :
Public Class frmFood
Inherits frmBase (custom usercontrol)
Private WithEvents ucTest As Test
Within a sub :
ucTest = new Test(some parameters)
Private Sub ucTest_ChangeNode() Handles Test.ChangeNode
MsgBox("Change node")
End Sub
End Class
Where I want to call the event :
Public Class Test
Inherits System.Windows.Forms.UserControl
Public Event TestEvent()
Private sub initPage()
RaiseEvent TestEvent()
End sub
End Class
Where I tell the event what to do :
Public Class frmFood
Inherits frmBase (custom usercontrol)
Private WithEvents ucTest As Test
Within a sub :
ucTest = new Test(some parameters)
Private Sub ucTest_ChangeNode() Handles Test.ChangeNode
MsgBox("Change node")
End Sub
End Class