如何在Visual Studio 2010中设置Winforms项目的启动形式 [英] How to setup the starting form of a winforms project in Visual Studio 2010
问题描述
有人知道如何在Visual Studio 2010中设置Winforms项目的起始形式吗?我已经骑马去了Project Properties并更改了Startup Object,但是在dowpdownlist中,唯一可用的选项是(None)"和"ProjectName.Program.cs". "program.cs"是我的默认代码文件.请帮我. (我在C#中工作)
Does anybody know how to setup the starting form of a winforms project in Visual Studio 2010? I have ridden to go to Project Properties and change Startup Object, but in dowpdownlist the only options available were "(None)" and "ProjectName.Program.cs". The "program.cs" is my default code file. Please help me. (Im working in C#)
推荐答案
在Program.cs中,有类似以下内容的行:
In your Program.cs, there is line like:
Application.Run(new Form1());
您可以在其中替换您想开始的表格.如果将Form1
更改为另一个Form类,则您的项目将从该类开始.
where you can substitute the form you'd like to start. If you change Form1
to another Form class, your project will start with that one.
这篇关于如何在Visual Studio 2010中设置Winforms项目的启动形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!