how to link 2 forms in vb.net[emergency]
-
let say i got 2 forms, form1 and form2, how i going to show form2 when i click one button in form1?? just like form2.show in vb6!! but i cant find that in vb.net!!
In the button click event handler in form1 create (or obtain) an instance of form2. MyForm2.Show() or MyForm2.ShowDialog() depending on how you want it to work. --Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown) Enumerators in .NET: See how to customise foreach loops with C#
-
In the button click event handler in form1 create (or obtain) an instance of form2. MyForm2.Show() or MyForm2.ShowDialog() depending on how you want it to work. --Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown) Enumerators in .NET: See how to customise foreach loops with C#
-
Dim MyForm2 as Form2
MyForm2 = New Form2()
MyForm2.Show()[I'm not a VB/VB.NET programmer so I may have the syntax slightly wrong] --Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown) Enumerators in .NET: See how to customise foreach loops with C#
-
Dim MyForm2 as Form2
MyForm2 = New Form2()
MyForm2.Show()[I'm not a VB/VB.NET programmer so I may have the syntax slightly wrong] --Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown) Enumerators in .NET: See how to customise foreach loops with C#
-
Say if you want to display form1 from form2. In the form2 create the instance of form1 - dim frm1 as new form1() and then frm1.show or frm1.showdialog will display the form - Sunil