Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

   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?

Posted

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

Software bugs are impossible to detect by anybody except the end user.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...