I'm very new to VB.net and having a lot of trouble raising a click event on another form. I've got two forms (form1 & form2). Form1 has a button that shows (or opens) form2 with the following code:
Dim newform2 As New Form2
Now I have a button on form2 that is supposed to close itself (form2) and raise the click event of button (btnCancel) on form1 that will clear all the textboxes (of form1) and do some other form houskeeping to get form1 back to its original state.
I've tried the folowing code but the "form1.btnCancel" bit produces a "Reference to a non-shared member requires an object refrence" error.
I'm using VB.NET Version 2003 and ANY help will be highly appreciated!
0 · ·