Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

?
Lv 6

What is the code to close a form in Visual basic?

Ok, so I haz this project for school where i need to make a program with 2 forms. Now i have figured out the code to open the next form (dim secondform as new form2 and the button code is secondform.show() ) but i cannot figure out how to make the first form disappear when i click the button. Is there a way to do this?

2 Answers

Relevance
  • 9 years ago
    Favorite Answer

    Unload me ' in vb6

    in the main form should be

    END

    'UNLOAD ME will only close the current form while END will close the entire project

    ---------------

    In vb.net

    Close

    Get more sample code and projects here in visual basic 6 and .net

    http://visualbasic-source-code.com/

    http://mosvisualbasic.com/

  • 9 years ago

    I think the "Unload" command help you-it works with vb 6 though :-)

Still have questions? Get your answers by asking now.