|
-
Dec 17th, 2008, 03:45 AM
#1
Thread Starter
New Member
[2008] Open and Close(all but first) with modal or zorder forms
I'm trying to get multiple forms to open/close in a certain way. I want them to either be modal, stay on top with zorder, or something similar...so, the user will have to: a) give input, b) can ask for help in that form with another button, or LogOut. It needs to be able to close all other forms back to the first (form1) with a LogOut button at other point. So, right off I was playing with modal and couldn't get Form2 to close. I'm not sure if this is the better way to approach it though or the details of how. If anyone has any better ways, I'd be glad to hear, thanks. (VS 2008)
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim form2Active As New Form2
form2Active.ShowDialog()
End Sub
End Class
Public Class Form2
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim form3Active As New Form3
form3Active.ShowDialog()
End Sub
End Class
Public Class Form3
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Form2.Close()
Me.Close()
End Sub
End Class
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
|