I have an application that among other things has an Edit Button and when the user clicks on that button I want a new window to open with various textboxes for editing purposes.
I can create a new window with code like
Form editform = new Form();
But I want to design that window in the Designer too.
In Visual Studio, right-click on your project and select Add->Windows Form. That will give you a new form to work with. Lay it out how you want. Then you can launch the window from your main window with code similar to the following:
MyEditForm form = new MyEditForm();
form.Show();
To answer Rick's comment on Brian's answer:
using (var login = new Login())
{
switch(login.ShowDialog())
{
case DialogResult.OK:
Application.Run(new Studio());
break;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With