如何在Visual Studio 2010中设置Winforms项目的启动形式 [英] How to setup the starting form of a winforms project in Visual Studio 2010

查看:119
本文介绍了如何在Visual Studio 2010中设置Winforms项目的启动形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆