A console application does not automatically add a reference to System.Windows.Forms.dll.
Right-click your project in Solution Explorer and select Add reference… and then find System.Windows.Forms and add it.
More Related Contents:
- CMD command on c#
- How can I read, write, and modify the contents of a notepad (.txt) file, in Winform and WPF? [duplicate]
- Make an Installation program for C# applications and include .NET Framework installer into the setup
- Can’t view designer when coding a form in C#
- addFontFile from Resources
- Combining multiple Attributes to a single Attribute – Merge Attributes
- Visual Studio build fails: unable to copy exe-file from obj\debug to bin\debug
- Is the size of a Form in Visual Studio designer limited to screen resolution?
- Unable to copy a file from obj\Debug to bin\Debug
- How can we change the background color of all other forms from one form?
- Show controls added programmatically in WinForms app in Design view?
- Save Settings in VB.Net or C#
- How to force my C# Winforms program run as administrator on any computer?
- How to programmatically include a file in my project?
- User Control vs. Windows Form
- How to setup the starting form of a winforms project in Visual Studio 2010
- F5 or Start Debugging Button is Greyed Out for Winform application?
- How do I set the size of the visible area of a form, minus heading and borders?
- Custom Color Palette in Visual Studio Color Property Editor
- What’s wrong with my C# codes?
- How is performance affected by an unused using directive?
- Model-View-Presenter in WinForms
- copying free hand drawing from panel in visual studio 2013
- How to loop a Console App
- Controls in container form come over child form?
- Draw multiple freehand Polyline or Curve drawing – Adding Undo Feature
- Getting HTML body content in WinForms WebBrowser after body onload event executes
- VS2005 C# Programmatically change connection string contained in app.config
- How can I add superscript power operators in c# winforms?
- Cursor Position relative to Application