Navigation
Home
   News
   Trebuchets
       Trebuchet #1
       Mangonel
       Trebuchet #2
       Project
       Links
   Programming
       Visual Basic
           Code Help
           Projects
   Mikwit.com Shop



To close one form and open another is a little complicated, but it can be done.  Here is how.

Put this in where you want the form to close:
     Dim [random name] As New [form wanted open's name]
     [random name].Show()
     Me.Hide()

(after this there needs to be a Goto to the bottom of the Sub, orell the rest of the code in the sub will be executed)

Ok now that will open the other form and only hide the first one, it is to my knowledge impossible to close it compleatly untill the program ends

To make this problem not a problem, in the code of the form that is opened put this:

     Private Sub [form name]_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
          End
     End Sub

and thats that, your done

Back to Code Help









Information
Page









© Copyright owner of mikwit.com 2004