Visual Studio C#2010为程序添加/编辑新的附加表单 [英] Visual Studio C# 2010 adding/editing new additional forms to a program
问题描述
在我的解决方案资源管理器中,它只显示我最初创建的第一个表单,而不是第二个表单。我上网并使用其中一个微软模糊技术来创建一个新表单,当点击一个按钮时,我有点迷路了。
我的程序正在运行有多个按钮,您可以点击并打开某些表单。我知道我已经设置了button_click来创建一个新表单。我现在想知道如何编辑这些创建的表单。
我尝试刷新我的解决方案资源管理器,它不会显示我新创建的设计。 (我认为这可能是我可能犯的错误之一,哈哈)有人请让我知道我应该做什么?
首先添加一个新表单。右键点击你的项目(我的项目名为 Test
)并给它一个名称(我称之为 TestForm
):
然后,将下面的代码添加到您的按钮中:
TestForm MyForm = new TestForm();
MyForm.Show();
So I am new to actually building GUI and I am creating a project where when you click on one button you open a new form. With this new form I want to be able to add and edit things to it.
In my solution explorer it is only showing the first form that I originally create, not the second one. I went online and used one of those little microsoft blurbs about creating a new form when a button is clicked, and I am a little lost from there.
My program is going to have multiple buttons that you click and they open certain forms. I understand that I have the button_click set to create a new form. I now want to know how to edit these forms that are created.
I tried refreshing my solution explorer and it wouldn't show my newly created design. (I thought that could be one of my possible errors, haha) Could someone please let me know what I should be doing?
First add a new form. Right click on your project (my project is called Test
) and give it a name (I called it TestForm
):
Then, add the following code to your button:
TestForm MyForm = new TestForm();
MyForm.Show();
这篇关于Visual Studio C#2010为程序添加/编辑新的附加表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!