hiii,
use following code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ConsoleApplication3
{
class Program : System.Windows.Forms.Form
{
static void Main(string[] args)
{
Console.WriteLine("hello");
Console.WriteLine(" ");
begin:
string code = Console.ReadLine();
if (code == "new form")
{
Application.EnableVisualStyles();
Application.Run(new Program());
goto begin;
}
}
private void InitializeComponent()
{
this.SuspendLayout();
this.ClientSize = new System.Drawing.Size(367, 188);
this.Name = "Program";
this.ResumeLayout(false);
}
}
}
also add two references
1) system.windows.forms
2) system.drawing