[STAThread] static void Main() { DateTime td = DateTime.Now; int hour = td.Hour; int min = td.Minute; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (hour >= 11 && hour < 12 && min >= 10 && min < 15) { Application.Run(new Form1(hour, min)); } else { Application.Run(new Form1()); } }