I am quite new to C#, so forgive my ignorance... I have (currently) 2 forms, one that needs to call the other. In other words, by clicking a certain button in Form1, Form2 needs to "pop up", like a dialog box. I know I have to get a reference in both forms, but I'm not entirely sure how to do this. What is a decent tutorial/beginner site to learn about GUIs in C#?
+2
A:
You can try this:
protected void Button1_Click(object sender, EventArgs e)
{
Form2 myForm = new Form2();
myForm.ShowDialog();
}
ShowDialog forces the user to close that window before s/he can access the rest of the application.
Matthew Jones
2009-11-06 16:00:24