Closing Forms


New to VB.net

How do I close form1 when a form2 is opened? In VB6, it was easy?


Comments

  • :
    : New to VB.net
    :
    : How do I close form1 when a form2 is opened? In VB6, it was easy?
    :
    :
    :

    I believe you can do a me{form1}.hide, form2.showdialog ... it has been a while since I've done this... don't forget to use me.show upon return...

    you might even be able to use me.visible property.
  • : :
    : : New to VB.net
    : :
    : : How do I close form1 when a form2 is opened? In VB6, it was easy?
    : :
    : :
    : :
    :
    : I believe you can do a me{form1}.hide, form2.showdialog ... it has been a while since I've done this... don't forget to use me.show upon return...
    :
    : you might even be able to use me.visible property.
    :


    Thanks buddy it worked once I did the following, it so much more work in .net ????????? me. was the key!

    FORM1
    Declarations

    Public frm2 As Form2

    Form1 Button

    frm2 = New Form2

    Me.frm2.Show()

    Me.Hide()



  • : FORM1
    : Declarations
    :
    : Public frm2 As Form2
    :
    : Form1 Button
    :
    : frm2 = New Form2
    :
    : Me.frm2.Show()
    :
    : Me.Hide()
    :
    if you use the showdialog() method to dispaly form2, you can use the dialogresult in form1 to test for cancel, etc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories