Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

navigation between forms 1

Status
Not open for further replies.

basbrian

Programmer
Feb 18, 2002
49
AU
Hi, I am very new at vb.net. I am using 2008. I am creating a project that consists of a menu form and several sub menus. i have been able to set up a button on the menu form that will open up the subform and set up an exit button on the subform button to go back to the menu form. however, now I have 2 instances of the menu form, I am not closing the menu form on openning the subform or I am not returning to the original menu form. where am I going wrong???
Code:
Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim insert_button As New insert_types

        insert_button.Show()
    End Sub


Private Sub Exit_insert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Exit_insert.Click
        Dim exit_button As New menu
        Me.Dispose()
        exit_button.Show()
    End Sub
 
Hi, I just got back into town and I'm tired so maybe I'm missing something in your post but is sounds like you should be looking at setting up a MDI Form. A MDI or multi document interface allows you to have a parent form that holds the menus and controls the child forms and their menus. This is ideal when setting up an application that uses multiple forms and menus.

A google search for mdi examples should be helpful.

 
Thanks. As I said I am very new to vb coding and I hve not heard of MDI's. This gives me a good place to start looking.

Once again, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top