If you want to open the form with a console application, you can refer to the following steps:
First add this code in .csproj file of the console application:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
</Project>
Second add project reference of GUI VISUIALZATION:
Finally you can refer to the following code in console application:
class Program
{
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new GUI());
Console.ReadKey();
}
}
2
solved Opening and writing to form from console aplication [closed]