using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Windows.Forms; namespace dccdc.hujiao { static class Program { /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var f = new frm_main(); Rectangle r = System.Windows.Forms.Screen.PrimaryScreen.Bounds; Point p = new Point(); p.Y = 0; p.X = r.X + (r.Width - f.Width) / 2; f.Location = p; f.TopMost = true; f.TopLevel = true; f.StartPosition = FormStartPosition.Manual; Application.Run(f); } } }