HelpForm Help?

Posts 18 of 8 · Page 1 of 1
Form Help?
Ok, so I have my main form. Let's say I have 3 buttons on there. Each button shows a different form. How do I make it so that when button 1 is pressed it shows the form, but then when button 2 is pressed, it hides button 1's form and shows button 2's form? Thanks! Need answer ASAP please
Just make the form global and use .Show() and .Hide()
Quote Originally Posted by ImMalkah View Post
Ok, so I have my main form. Let's say I have 3 buttons on there. Each button shows a different form. How do I make it so that when button 1 is pressed it shows the form, but then when button 2 is pressed, it hides button 1's form and shows button 2's form? Thanks! Need answer ASAP please
Form2 frm2 = new Form2()

then use frm2.Show();
or frm2.Hide(); as you need it
Are you new or something? Lel.

You should be able to do it with a simple .Show() and .Hide()

frm1.Show()

frm1.Hide() for example.

If you're looking for the EXACT thing to type, I'll show you that too.
Hello, i guess this is what your looking for.
Code:
private void button1_Click(object sender, EventArgs e)
        {
             form1 form1 = new form1();
             form1.show();
        }

private void button2_Click(object sender, EventArgs e)
        {    
             form1.Hide();
             form2 form2 = new form2();
             form2.show();
        }

private void button3_Click(object sender, EventArgs e)
        {
             form2.Hide();
             form3 form3 = new form3();
             form3.show();
        }
Use .Show() and .Hide()
Ppl look at the post date of the OP.
Oh well .. Atleast I helped I guess
Posts 18 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?