Hi,
I have made a button and by clicking on it a new window opens. The code in the button is
Form myForm = new Form();
myForm.Show();
This works fine, but how do I actually work on myForm visually Or how do I make myForm one of the files of my project
I'm using Visual C# 2005 which includes .net.
Thanks,
Behrouz

How to open a window
Shruti00
I did that but the visual form (that was added from the Add New Item) does not have any connection with the form that opens up from the button!!!
The code in the button is
Form myForm = new myForm();
myForm.Show();
The name of the form that was added from the Add New Item is also called myForm, But the two dont connect together :(
Thanks for the help,
Bruce
Kuda
Steve Hines
Try:
MyForm myForm = new MyForm();
Smithie
Select Project -> Add New Item from the menu, and select Windows Form. Give it a name (let's say MyForm), and then can use the VS designer to add new controls to it. Then, you can use the name of that form class in your code:
MyForm myForm = new myForm();
myForm.Show();