tags:

views:

312

answers:

3

I am new to C# can anybody tell me on How to show a new Form on click of a button.

+7  A: 

Try this:

private void Button1_Click(Object sender, EventArgs e ) 
{
   var myForm = new Form1();
   myForm.Show();
}
John Nolan
Thanx John Nolan
subbu
+2  A: 
private void ButtonClick(object sender, System.EventArgs e)
{
    MyForm form = new MyForm();
    form.Show(); // or form.ShowDialog(this);
}
Bryan
+3  A: 

Double click the button in the form designer and write the code:

    Form2 form2 = new Form2();
    form2.Show();

Search some samples on the Internet.

Nelson Reis