Lemon Posted March 1, 2004 Posted March 1, 2004 Private Sub mnuBestandNewdb_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles mnuBestandNewdb.Click 'form1 Dim frmstartNieuweDatabase As New frmstartNieuweDatabase(Me) frmstartNieuweDatabase.Show() 'form2 Dim frmStap2NieuweDatabase As New frmStap2NieuweDatabase(me) frmStap2NieuweDatabase.Show() End Sub What i really want to do is. If i press on a button in form1 (Next). Then some stuff has is to to enc in form1, then after all that when its finished, it closed itself. On that point must open form2. But i dont have a clue how i can do this. I tryed to insert a while loop between the 2 forms with a var, but that just freezes my prog. Anyone has any idea how i can do this? Quote
AlexCode Posted March 1, 2004 Posted March 1, 2004 Try this: Private Sub mnuBestandNewdb_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles mnuBestandNewdb.Click 'form1 Dim frmstartNieuweDatabase As New frmstartNieuweDatabase(Me) frmstartNieuweDatabase.ShowDialog() 'form2 Dim frmStap2NieuweDatabase As New frmStap2NieuweDatabase(me) frmStap2NieuweDatabase.ShowDialog() End Sub Using ShowDialog instead of Show when showing a form will cause the code to stop until the form is closed... In this case Form1 is shown and only after it's closed the Form2 code is run... Alex :p Quote Software bugs are impossible to detect by anybody except the end user.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.