コード例 #1
0
        static void Main()
        {
            bool isNew;
            mutex = new Mutex(false, Application.ProductName + "_abcxyz16091994", out isNew);

            if (isNew)
            {
                //ok just this instance running
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                fmEinstellungen = new FormEinstellungen();
                fmMain = new FormMain();

                fmMain.IniFormMain();

                Application.Run();
            }
            else
            {
                MessageBox.Show("Eine Instanz des Programmes läuft bereits, bitte vorher beenden.", "Fehler",
                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                //wait, we just want 1 instance running... run to end
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: janis2013/TextVerteiler
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            fmEinstellungen = new FormEinstellungen();
            fmMain = new FormMain();

            fmMain.IniFormMain();

            Application.Run();
        }