withevents in vb.net
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
Hello The withevents key word means that you can enable the catching of events in that object. If you are accessing a class with events you need to insert that keyword to catch them.If not you can still access the methods, properties... but you won´t catch events. 'Main Form Private WithEvents Catch_Event as new Test Private Sub Test_Result (ByVal Value as Integer) Handles Catch_Event.Test_Result End Sub 'Class Test Public Class Test Public Event Test_Result (ByVal Value as Integer) Public Function StartEvent() RaiseEvent Test_Result (10) End Function End Class Hope it Helps