opening a form via button ?

Posts 1–9 of 9 · Page 1 of 1
opening a form via button ?
im sure its extremely simple but i cant figure it out..lol. andyways im trying to figure out how to open another form from a button. so basically. i have the main menu and options (Form1) and i want to set it so that when i hit a button, it opens another form with seperate options. thanks guys.
First make a button then do this

Form2.Show()

or for form 3 then
Form3.Show()

Etc...

And if you want your main menu to close when form 2 opens:
Form2.show()
me.close()
Quote Originally Posted by NSixx View Post
First make a button then do this

Form2.Show()

or for form 3 then
Form3.Show()

Error 1 'form2' is not declared. It may be inaccessible due to its protection level.
have form 2 made and idk wtf im doing wrong :/


Etc...

And if you want your main menu to close when form 2 opens:
Form2.show()
me.close()

Error 1 'form2' is not declared. It may be inaccessible due to its protection level.
have form 2 made and idk wtf im doing wrong :/
make sure its in your project not just opened
Don't add me.close cause that will close the program.. Its me.hide im uploading a gif image, which should help you.
Quote Originally Posted by HexMurder View Post
Error 1 'form2' is not declared. It may be inaccessible due to its protection level.
have form 2 made and idk wtf im doing wrong :/
add form 2 first, use >> Add new form>> Form2.vb
Then make a button
then type Form2.show()
Quote Originally Posted by AceKill3r View Post
Don't add me.close cause that will close the program.. Its me.hide im uploading a gif image, which should help you.
Read what i said,
i said if he wants his main page closed then type
me.close()
I know thats what you said, but he didn't want that!
Go to Project > [Name] Properties > Application > All the way down to [ Shutdown mode].
Change from "When startup form closes"" to "When last form closes"

Now you can use me.close on the button
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us