set startup object problem
hi y'all...
i have form1 in my project.i added form2 and made it an MDI form.how do i make form2 as startup object? and what is the equivalent of the VB6 statement form1.show...?
more power, gurus!
[220 byte] By [
nikko] at [2007-11-19 14:07:29]

# 1 Re: set startup object problem
In Solution Explorer right-click on the project name, and select Properties.
Right there on General you see a Startup Object. It is a combobox with all the forms and Sub Main for you to choose.
As for the your second question, a Form has to methods to show itself: Show() will show it modless, and ShowDialog() will show it modal.
# 2 Re: set startup object problem
got it, thanks!
as for the second question...
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Form1.Show()
End Sub
this doesnt work...help...!
nikko at 2007-11-10 3:17:04 >

# 3 Re: set startup object problem
ok...
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim x As New Form1
x.Show()
End Sub
the above code shows form1...but not as a child of form2...how do i make it a child...?
nikko at 2007-11-10 3:18:11 >

# 4 Re: set startup object problem
ok...
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim x As New Form1
x.MdiParent = Me
x.Show()
End Sub
got it...must be somethin' i ate...tnx!
nikko at 2007-11-10 3:19:06 >
