开发者

Setting up the start up form in visual studio team system 2008

I am working on a windows forms application using C# in visual studio 2008 team system. I would want to display a different form at start up of application. Please help (In project properties , under application tab there is no display 开发者_开发百科of different forms name in the combo box)


I think there's no property page for this any more, like it used to be in Visual Basic 5. Yeah, this is a huge gab, but I don't have all Versions in mind.

Anyway, Visual Studio should have created a Main method for you, usally this is in Program.cs. There you will find the following line.

Application.Run(new Form1());

Just replace Form1 with your Windows.Forms class.


You need to change the default file of your project:

static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new test_form());
}

Here test_form() is the name of default for which will be started first

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜