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
2009-10-12 07:45:51
Thanx John Nolan
subbu
2009-10-12 07:46:38
+2
A:
private void ButtonClick(object sender, System.EventArgs e)
{
MyForm form = new MyForm();
form.Show(); // or form.ShowDialog(this);
}
Bryan
2009-10-12 07:47:17
+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
2009-10-12 07:48:29