Kevin
Kevin

Reputation: 1240

How to run a Windows Form in a C# application

I am new to Visual Studio and I have just designed a simple Form that captures some user input text and displays it to the screen. However, I don't know how to include this Form in a C# application. The code in the Form1.cs file is obviously incomplete -- ie, it does not contain any formatting data.

Any advice is appreciated.

Regards.

Upvotes: 0

Views: 4150

Answers (1)

Reed Copsey
Reed Copsey

Reputation: 564323

If you use the normal WIndows Forms application template, Form1 will automatically load when you run.

If not, I recommend building a template program, and looking at Program.cs - it shows the typically boilerplate code used to launch the "main" form and start the application properly.

Upvotes: 2

Related Questions