Beispiel #1
0
        public static void Run(Form f, StartupNextInstanceEventHandler startupHandler)
        {
            SingleInstance app = new SingleInstance();

            app.MainForm             = f;
            app.StartupNextInstance += startupHandler;
            app.Run(Environment.GetCommandLineArgs());
        }
Beispiel #2
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     SingleInstance.Run(Program.formMain = new Form1(), new StartupNextInstanceEventHandler(Program.StartupNextInstanceHandler));
 }