Closing form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CAM

    #1

    Closing form

    Hello,

    I have a form called "Unassigned " that has a control button called "Main
    Menu" when pushed the button opens the "main menu" form, but I want to
    close the the "Unassigned " form after I press the "Main Menu" button. How
    do I code that. Below is my code to open the "main menu" form.

    Private Sub btnMainMenu_Cli ck(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles btnMainMenu.Cli ck
    frmMainMenu.Sho w()
    End Sub

  • James Hahn

    #2
    Re: Closing form

    It depends on exaclty what you mean by 'close', but this will work:

    Private Sub btnMainMenu_Cli ck(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles btnMainMenu.Cli ck
    frmMainMenu.Sho w()
    Me.Close()
    End Sub

    Me.Hide() is another option.

    "CAM" <alex_martinez@ ca.rr.comwrote in message
    news:13E210BE-7EBB-4DDB-BEBE-B2547B8D2DFD@mi crosoft.com...
    Hello,
    >
    I have a form called "Unassigned " that has a control button called "Main
    Menu" when pushed the button opens the "main menu" form, but I want to
    close the the "Unassigned " form after I press the "Main Menu" button.
    How do I code that. Below is my code to open the "main menu" form.
    >
    Private Sub btnMainMenu_Cli ck(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles btnMainMenu.Cli ck
    frmMainMenu.Sho w()
    End Sub

    Comment

    Working...