.NET
Microsoft Technologies based on the .NET software framework.
3,668 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I have this in Form1,
Public Event BTN_PROF_Details_Event()
Private Sub FID_Container_Click(sender As Object, e As EventArgs) Handles BTN_PROF_Details.Click
RaiseEvent BTN_PROF_Details_Event()
End Sub
Then this is in an Object class
Private Sub PNL_PROF_FID_Event(ByVal sender As Object, ByVal e As EventArgs) Handles BTN_PROF_Details_Event
Trace.WriteLine("test")
End Sub
My problem stems from the event requiring WithEvents?
How could I fix this?
Thank you,
Connor Frayne
This should work in your class:
Public WithEvents f1 As Form1
Private Sub PNL_PROF_FID_Event() Handles f1.BTN_PROF_Details_Event
Trace.WriteLine("test")
End Sub
The Form1 form must be assigned to f1. (You can use Me if the object is created inside the Form1).