How can I process a form's events in another class / module automatically in VB.NET
Posted
by CowKingDeluxe
on Stack Overflow
See other posts from Stack Overflow
or by CowKingDeluxe
Published on 2010-05-03T20:06:07Z
Indexed on
2010/05/03
20:08 UTC
Read the original article
Hit count: 289
Here's my code:
Public Class Form1
End Class
Public Class Form1Handler
Inherits Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("I")
End Sub
End Class
I'm trying to get Form1Handler to process Form1's events automatically. How can I do this? Should I use a module instead? I'm doing this in VB 2010.
I don't want to have to make an event handler in Form1 and then pipe it to the other class / module, is there some way to automatically "pipe" the events from form1 to form1handler?
© Stack Overflow or respective owner