我有一个除其他事项外有一个编辑按钮和一个应用程序,当用户点击该按钮我想要一个新的窗口,以各种文本框打开进行编辑。
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.
我可以创建code一个新的窗口像
I can create a new window with code like
Form editform = new Form();
不过,我想设计在设计该窗口了。
But I want to design that window in the Designer too.
在Visual Studio中,您的项目右键单击,然后选择添加 - > Windows窗体。这会给你一种新形式的工作。你想怎么打好它。
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();