|
-
Mar 30th, 2004, 10:02 PM
#11
Thread Starter
Junior Member
IT WORKS!!!!
Finally figured it out:
Just a recap or what I am trying to do.
I have three forms, from1, form2 and form3.
When the programs starts form1 is shown, with a pushbutton. When you press the push button on form1, form2 is displayed. Form2 also has a push button which when pressed will display form3. So all three forms are displayed at once. Then when you press a button on form3, form2 and form3 need to close while form1 stays open.
Here is the code....
For Form1:
Private Sub Button1_Click
Dim Form2 As New Form2
Form2.Show()
End Sub
For Form2:
Private Sub Button1_Click
Dim Form3 As New Form3
If Form3.ShowDialog = DialogResult.OK Then
Me.Close()
End If
End Sub
For Form3:
Private Sub Button1_Click
DialogResult = DialogResult.OK
me.close()
End Sub
Hope this helps others who may need to control several forms from one form. Thanks for everyones help and support.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|