public static void Main() { // ref: http://qiita.com/hart_edsf/items/0301f17e2d9acd890c5e Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (MainForm form = new MainForm()) { form.Show(); // Note: there may be some issues with this. // see http://blogs.msdn.com/b/rickhos/archive/2005/03/30/403952.aspx while (form.Created) { form.Loop(); Application.DoEvents(); } } }