How to open a new window in windows form application?

C# Windows Form Application Errors In Program.cs:?

  • I'm trying to make a windows form application and before I even start I get these 3 errors in Program.cs: Application.EnableVisualStyles(); Application.SetCompatibleTextRendering… Application.Run(new Form1()); 1st line error: "EnableVisualStyles" 2nd line error: "SetCompatibleTextRenderingDefault" 3rd line error: "Run" How can I fix these?

  • Answer:

    is there a using System.Windows.Forms line at the top of your Program.cs? Did you include the System.Windows.Forms as a reference in your project?

Donavon at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.