简体   繁体   English

Visual C#2010 Express:在应用程序中为新表单打开设计和设计器选项卡

[英]Visual C# 2010 Express: Opening a design and designer tab for a new form in the application

I want to create a form hat can be opened from the main form. 我要创建一个可以从主窗体打开的窗体帽子。 But I don't really want to try to do it without a design and designer tabs. 但是我真的不想尝试没有设计和设计器标签的情况。 The main form has them by default. 默认情况下,主窗体具有它们。 I'm not completely familiar with MS Visual C# 2010 express... 我对MS Visual C#2010 Express不完全熟悉...

How can I open a design and designer tabs for a new form in the application? 如何在应用程序中为新表单打开设计和设计器选项卡?

Add a new Form in your solution: 在您的解决方案中添加一个新表单:

新增项目新增表格

Then add the following code somewhere in Form1.cs : 然后在Form1.cs中的某处添加以下代码:

Form2 form = new Form2();
form.Show();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM