Great, thanks. :)
When I try this, I get,
'show' is not a member of 'System.Array'.
Here's the code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim f As Form1()
f.show()
End Sub
in the solution explorer, my form name is form1.
> Great, thanks. :)
> > "Chris O." <coz1978@sbcglobal.net> schrieb:
[quoted text clipped - 5 lines]
> > f.Show()
> > ///
Jay B. Harlow [MVP - Outlook] - 04 Oct 2004 02:36 GMT
Chris,
You defined f to be an array of Form1, if you want f to be a single
instance, do not include the () after Form1.
Also you may want to create an instance of Form1 before you attempt to show
it.
Something like:
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
[quoted text clipped - 4 lines]
>
> End Sub
NOTE: When you are creating an instance (New Form1) you can either include
or exclude the parentheses.
Dim f As New Form1()
f.show()
There is also a ShowDialog that will show the form Modal (wait for the form
to be closed). Form.Show shows the form modeless, meaning both forms
continue being input capable. ShowDialog also returns one of the
DialogResult values so you can tell if the user clicked the Ok, Cancel or
other "special" buttons on your dialog box (form).
Dim f As New Form1()
Dim result As DialogResult
result = f.ShowDialog()
Hope this helps
Jay
> When I try this, I get,
> 'show' is not a member of 'System.Array'.
[quoted text clipped - 20 lines]
>> > f.Show()
>> > ///