Hi,
I am a web programmer but new to doing windows application. I have a windows form with a button controls and I want a situation where when a user click a particular button it will load another form. Pls advise.
Kind regards.
Femi
Button Click Events
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

FroglegRank #1,020 · 1.9K reputationPosted Dec 21, 2010, 8:57 AM EST
1: Add additional forms
2: Add a module and within that module put -
Public Fm1 as Form1
Public Fm2 as Form2 and so on
In form load event of each form put - "Fm1 =Me","Fm2=Me" and so on
In the form1 button put
If Fm2 Is Nothing = True Then
Dim Fm2 As New Form2
Fm2.Show()
Else : Fm2.Show()
End If
This will load only one instance of form2 - note to keep form2 active in your project you will have to hide it rather than using
Close()
Put a textbox onto form1 and a label and button on form2
in form2 button event put - Label1.Text = Fm1.Textbox.Text
now you can see how data is transfered