winform 无窗体保持消息循环
static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var timer1 = new System.Windows.Forms.Timer() { Interval = 1000 }; timer1.Tick += new EventHandler(timer1_Tick); timer1.Start(); Application.Run(); } static void timer1_Tick(object sender, EventArgs e) { throw new NotImplementedException(); } }
桂棹兮兰桨,击空明兮溯流光。
浙公网安备 33010602011771号