I am trying to write a WinForm directly from Notepad++
But when I run the .exe file it opens a console with no text and also the WinForm If I close it the WinForm closes
How can I hide the console so only the WinForm opens My base code is:
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace CodeTry
{
public class Form1336 : Form
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1336());
}
public Form1336()
{
this.Size = new Size(500, 300);
this.Location = new Point(30, 30);
}
}
Thanks in Advance
Note: When I double-click on try.exe, the console Window opens (the one in black) and also de WinForm. If I close the console the WinForm closes
If you're using Visual Studio; under application in the project properties window, change the output type from Console Application to Windows Application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With