System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(bool)

Here are the examples of the csharp api System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(bool) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1304 Examples 7

19 Source : Program.cs
with GNU General Public License v3.0
from 00000vish

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from 00000vish

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            try
            {
                //since cant detect if user open or started with windows
                //this app will only open with windows and opens app with -startup let main know its open with windowws
                checkArgs();
            }
            catch (Exception D) { MessageBox.Show(D.ToString());}           
            Environment.Exit(0);
        }

19 Source : Program.cs
with GNU General Public License v3.0
from 0x00000FF

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmMain());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from 0x2b00b1e5

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.ApplicationExit += new EventHandler(OnApplicationExit);
            t.Start();
            using (NotifyIcon icon = new NotifyIcon())
            {
                icon.Icon = System.Drawing.Icon.ExtractreplacedociatedIcon(Application.ExecutablePath);
                icon.ContextMenu = new ContextMenu(new MenuItem[] {
                    new MenuItem("Options", (s, e) => {new Form1().Show();}),
                    new MenuItem("Exit", (s, e) => { Application.Exit(); }),
                });
                icon.Visible = true;

                Application.Run();
                icon.Visible = false;
            }
        }

19 Source : cMain.cs
with MIT License
from 0xPh0enix

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new fMain());
        }

19 Source : Program.cs
with MIT License
from 0xLaileb

[STAThread]
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Demo());
        }

19 Source : Program.cs
with MIT License
from 1-EXON

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new DiscordWebhook());
        }

19 Source : Program.cs
with MIT License
from 20chan

[STAThread]
        static void Main() {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

19 Source : Program.cs
with MIT License
from 1CM69

[STAThread]
    private static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      Application.Run((Form) new MainForm());
    }

19 Source : Program.cs
with Apache License 2.0
from 214175590

[STAThread]
        static void Main(string[] args)
        {
            if (null != args && args.Length > 3)
            {
                initUser = new SshUser();
                initUser.Host = args[0];
                initUser.UserName = args[1];
                initUser.Preplacedword = args[2];
                initUser.Port = Convert.ToInt32(args[3]);
            }
            /*AllocConsole();
            windowHandle = FindWindow(null, Process.GetCurrentProcess().MainModule.FileName);

            IntPtr closeMenu = GetSystemMenu(windowHandle, IntPtr.Zero);
            uint SC_CLOSE = 0xF060;
            RemoveMenu(closeMenu, SC_CLOSE, 0x0);
            SetConsolereplacedle("调试信息");*/

            try
            {
                //处理未捕获的异常   
                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
                //处理UI线程异常   
                Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
                //处理非UI线程异常   
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);


                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                MAIN = new MainForm();
                Application.Run(MAIN);

                //Application.Run(new SftpForm(initUser));
            }
            catch (Exception ex)
            {
                string str = GetExceptionMsg(ex, string.Empty);
                MessageBox.Show(str, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            
            //FreeConsole();
        }

19 Source : Program.cs
with MIT License
from 2401dem

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            form1 = new Form1();
            Application.Run(form1);
        }

19 Source : Program.cs
with MIT License
from 2881099

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            MiniblinkPInvoke.Resourcereplacedemblys.Add("FreeSqlTools", System.Reflection.replacedembly.GetExecutingreplacedembly());
            MiniblinkPInvoke.PageNameSpace = "FreeSqlTools.Pages";
            Curd.InitFreeSql();
            Application.Run(new FrWebMain());
        }

19 Source : Program.cs
with MIT License
from 2881099

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ApplicationEventHandlerClreplaced AppEvents = new ApplicationEventHandlerClreplaced();
            Application.ThreadException += new ThreadExceptionEventHandler(AppEvents.OnThreadException);
            Application.Run(new Form1());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from 2dust

[STAThread]
        static void Main()
        {
            if (Environment.OSVersion.Version.Major >= 6)
            {
                SetProcessDPIAware();
            }

            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);


            //AppDomain.CurrentDomain.replacedemblyResolve += CurrentDomain_replacedemblyResolve;

            if (!IsDuplicateInstance())
            {

                Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");

                //设置语言环境
                string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
                Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
            }
            else
            {
                UI.ShowWarning($"v2rayN is already running(v2rayN已经运行)");
            }
        }

19 Source : Program.cs
with GNU General Public License v3.0
from 2dust

[STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm(args));
        }

19 Source : Program.cs
with MIT License
from 86Box

[STAThread]
        static void Main()
        {
            if (Environment.OSVersion.Version.Major >= 6)
                SetProcessDPIAware();

            SetCurrentProcessExplicitAppUserModelID(AppID);
            const string name = "86Box Manager";

            //Use a mutex to check if this is the first instance of Manager
            mutex = new Mutex(true, name, out bool firstInstance);

            //If it's not, we need to restore and focus the existing window, as well as preplaced on any potential command line arguments
            if (!firstInstance)
            {
                //Finds the existing window, unhides it, restores it and sets focus to it
                IntPtr hWnd = FindWindow(null, "86Box Manager");
                ShowWindow(hWnd, ShowWindowEnum.Show);
                ShowWindow(hWnd, ShowWindowEnum.Restore);
                SetForegroundWindow(hWnd);

                //If this second instance comes from a VM shortcut, we need to preplaced on the command line arguments so the VM will start
                //in the existing instance.
                //NOTE: This code will have to be modified in case more command line arguments are added in the future.
                if (args.Length == 3 && args[1] == "-S" && args[2] != null)
                {
                    string message = args[2];
                    COPYDATASTRUCT cds;
                    cds.dwData = IntPtr.Zero;
                    cds.lpData = Marshal.StringToHGlobalAnsi(message);
                    cds.cbData = message.Length;
                    SendMessage(hWnd, WM_COPYDATA, IntPtr.Zero, ref cds);
                }

                return;
            }
            else
            {
                //Then check if any instances of 86Box are already running and warn the user
                Process[] pname = Process.GetProcessesByName("86box");
                if (pname.Length > 0)
                {
                    DialogResult result = MessageBox.Show("At least one instance of 86Box.exe is already running. It's not recommended that you run 86Box.exe directly outside of Manager. Do you want to continue at your own risk?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                    if (result == DialogResult.No)
                    {
                        return;
                    }
                }
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new frmMain());
            }
        }

19 Source : Program.cs
with GNU General Public License v3.0
from 9vult

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmStartPage());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from 9vult

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Initialize the Client
            WFClient.Initialize();

            Application.Run(new FrmLauncher());
        }

19 Source : Program.cs
with MIT License
from a11s

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Form form=null;
            Console.WriteLine("All test:");
            Console.WriteLine("1 PureUdp test");
            Console.WriteLine("2 PureKcp test");
            Console.WriteLine("3 Udp+Kcp mix test");
            Console.WriteLine("4 PureKcp withflush minrto mix test");
            Console.WriteLine("other: exit");
            string input = "";           
            Console.WriteLine("input 1~4:");
            input = Console.ReadLine();
            switch (input.Trim())
            {
                case "0":
                    form = new ClientForm1();
                    break;
                case "1":
                    form = new ClientUdp();
                    break;
                case "2":                         
                    form = new ClientKcp();
                    break;
                case "3":
                    form = new ClientMix();
                    break;
                case "4":                    
                    KcpSetting.Default.RTO = 1;
                    KcpSetting.Default.NoDelay = 1;
                    KcpSetting.Default.NoDelayInterval = 1;
                    KcpSetting.Default.NoDelayResend = 10;
                    KcpSetting.Default.NoDelayNC = 1;
                    KcpSetting.Default.SndWindowSize = 2048;
                    KcpSetting.Default.RecWindowSize = 2048;
                    KcpSetting.Default.MTU = Utilities.PackSettings.MAX_DATA_LEN;
                    form = new ClientKcp();
                    break;
                default:
                    return;
                    break;
            }

            Application.Run(form);
        }

19 Source : Program.cs
with MIT License
from a11s

[STAThread]
        static void Main()
        {
            //sw.Start();
            //lasttime = DateTime.Now;
            //System.Threading.SpinWait wait = new System.Threading.SpinWait();
            //for (int i = 0; i < 100000; i++)
            //{
            //    if (DateTime.Now.Subtract(lasttime).TotalMilliseconds > 1000)
            //    {
            //        lasttime = DateTime.Now;
            //        Console.WriteLine($"{sw.ElapsedMilliseconds}\t {counter - counter2}\t {counter}");
            //        counter2 = counter;
            //    }
            //    wait.SpinOnce();
            //    counter++;
            //}
            Console.WriteLine("All test:");
            Console.WriteLine("1 PureUdp test");
            Console.WriteLine("2 PureKcp test");
            Console.WriteLine("3 Udp+Kcp mix test");
            Console.WriteLine("4 PureKcp withflush minrto test");
            Console.WriteLine("other: exit");
            string input = "";
            Console.WriteLine("input 1~4:");
            input = Console.ReadLine();
            switch (input.Trim())
            {
                case "0":
                    StartServer = StartServer0;
                    break;
                case "1":
                    StartServer = StartServer1;
                    break;
                case "2":
                    StartServer = StartServer2;
                    break;
                case "3":
                    StartServer = StartServer3;
                    break;
                case "4":
                    StartServer = StartServer4;
                    break;
                default:
                    return;
                    break;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ServerForm1());
            var servertype = Server.GetType().Name;
            var t = Server.AsyncClose(TimeSpan.FromSeconds(10));
            Console.WriteLine("closing..");
            t.Wait();
            Console.WriteLine($"Server {servertype} Closed. Press any to to exit");
            Console.ReadKey();
        }

19 Source : Program.cs
with MIT License
from a11s

[STAThread]
        static void Main()
        {
            Console.WriteLine("All test:");
            Console.WriteLine("1 PureUdp test");
            Console.WriteLine("2 PureKcp test");
            Console.WriteLine("3 Udp+Kcp mix test");
            Console.WriteLine("4 PureKcp withflush minrto mix test");
            Console.WriteLine("other: exit");
            string input = "";
            Console.WriteLine("input 1~3:");
            input = Console.ReadLine();
            switch (input.Trim())
            {
                case "0":
                    StartServer = StartServer0;
                    break;
                case "1":
                    StartServer = StartServer1;
                    break;
                case "2":
                    StartServer = StartServer2;
                    break;
                case "3":
                    StartServer = StartServer3;
                    break;
                case "4":
                    StartServer = StartServer4;
                    break;
                default:
                    return;
                    break;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
            var servertype = Server.GetType().Name;
            Server?.Close(TimeSpan.FromSeconds(10));
            Console.WriteLine("closing..");
            
            Console.WriteLine($"Server {servertype} Closed. Press any to to exit");
            Console.ReadKey();
        }

19 Source : Program.cs
with MIT License
from a2633063

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ZUART());
        }

19 Source : Program.cs
with MIT License
from a1xd

[STAThread]
        static void Main()
        {
            var mutex = new System.Threading.Mutex(true, "RawAccelGrapher", out bool result);

            if (!result)
            {
                MessageBox.Show("Another instance of the Raw Accel Grapher is already running.");
                return;
            }

            CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
            CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;

            AppDomain.CurrentDomain.UnhandledException += GlobalUnhandledExceptionHandler;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new RawAcceleration());

            GC.KeepAlive(mutex);      
        }

19 Source : Program.cs
with GNU General Public License v3.0
from a4004

[STAThread]
        static void Main(string[] argv)
        {
            if (argv.Any(o => o.Contains("--debug") || o.Contains("-d")))
            {
                NativeMethods.AllocConsole();
                Default = Console.ForegroundColor;
                DebugMode = true;

                Console.replacedle = "Espressif Flash Manager - Debugging Console";
            }

            AllowFileDebugging = -1;
            Debug("Application init.");

            if (argv.Any(o => o.Contains("--fixdriver") || o.Contains("-fd")))
            {
                Debug("Program executed with --fixdriver flag. Device picker will be disabled and esptool will autodetect" +
                    " in order to mitigate access denied error messages.");

                Settings.PortFix = true;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

            if (argv.Any(o => o.Contains("--portable") || o.Contains("-p")))
            {
                Portable = true;

                Debug("Program executed with the --portable flag which removes the need for Python and the esptool module" +
                    " and instead uses a precompiled (outdated) copy of the esptool.", Event.Warning);
                Debug("You are warned that using untrusted executables not provided by N2D22 exposes your computer system" +
                    " to security risks. It's recommended that you do not use this mode and instead use the Python utility.", Event.Warning);

                if (!File.Exists("esptool.exe"))
                {
                    Debug("Could not find a matching file for esptool.exe in the current working directory.", Event.Critical);

                    OpenFileDialog fileDialog = new OpenFileDialog()
                    {
                        Multiselect = false,
                        SupportMultiDottedExtensions = true,
                        Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*",
                        replacedle = "Browse for esptool binary",
                    };

                    if (fileDialog.ShowDialog() == DialogResult.OK)
                        Settings.EsptoolExe = fileDialog.FileName;
                    else
                        Terminate();                  
                }
                else
                    Settings.EsptoolExe = "esptool.exe";
            }

            Application.ThreadException += (s, e) =>
            {
                Debug("threadexception", e.Exception.ToString(), Event.Critical);

                MainWindow.Instance.Invoke(new Action(() =>
                {
                    MessageBox.Show($"{e.Exception.Message}\nThe application will terminate immediately.", "Unexpected Error",
                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Terminate();
                }));
            };
            AppDomain.CurrentDomain.UnhandledException += (s, e) =>
            {
                Debug("appdomain", e.ExceptionObject.ToString(), Event.Critical);

                MainWindow.Instance.Invoke(new Action(() =>
                {
                    MessageBox.Show($"{(e.ExceptionObject as Exception).Message}\nThe application will terminate immediately.", "Unexpected Error",
                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Terminate();
                }));
            };

            if (!argv.Any(o => o.Contains("--debugyes") || o.Contains("-dyes")) && DebugMode)
            {
                Debug("[WARN] Do not close this debugging window, doing so will prevent logging " +
                    "to the disk and may cause unintended behaviour.", Event.Critical);
                Debug("If you wish to hide this window, please run N2D22 without the --debug flag.", Event.Warning);

                string conf = string.Empty;

                do
                {
                    Console.Write("Please type \"understood\" without the quotes to continue: ");
                    conf = Console.ReadLine();
                }
                while (conf != "understood");

                Debug("To debug faster, simply append 'yes' to the --debug flag i.e. \"--debugyes\" to skip the confirmation.", Event.Success);

                Console.Write("Press any key to continue . . .");
                Console.ReadKey();
            }

            Debug("Creating MainWindow");
            Application.Run(new MainWindow());
            Debug("Window destroyed. Exiting", Event.Critical);

            if (argv.Any(o => o.Contains("--debug") || o.Contains("-d")))
                NativeMethods.FreeConsole();

            Terminate();
        }

19 Source : Program.cs
with MIT License
from aaaddress1

[STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            mainUi = new UI();

            if (args.Length > 0)
                mainUi.srcPath = args[0];

            Application.Run(mainUi);
        }

19 Source : Program.cs
with MIT License
from aabiryukov

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }

19 Source : Program.cs
with MIT License
from ab4d

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using (var form = new OculusDemoForm())
            {
                form.Run();
            }
        }

19 Source : Program.cs
with MIT License
from AbdisamadMoh

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
           Application.Run(new Form1());
        }

19 Source : Program.cs
with MIT License
from ABN-SFLookupTechnicalSupport

[STAThread]
      static void Main() {
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new FormAbnLookup());
      }

19 Source : Program.cs
with MIT License
from Abneed

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FormMain());
        }

19 Source : Program.cs
with MIT License
from ABTSoftware

[STAThread]
        static void Main()
        {
            // TODO SET YOUR LICENSE KEY HERE 
            SciChartSurface.SetRuntimeLicenseKey(@"TODO SET KEY HERE");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

19 Source : Program.cs
with MIT License
from ACBrNet

[STAThread]
		static void Main()
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			Application.Run(new FrmMain());
		}

19 Source : Program.cs
with Microsoft Public License
from achimismaili

[STAThread]
        static void Main()
        {
            if (SPFarm.Local == null)
            {
                string msg = "Cannot find local SharePoint Farm. "
                    + "Either this account has not enough access to the SharePoint config db"
                    + " (dbReader is not sufficient, dbOwner is recommended)"
                    + " or SharePoint " + spver.SharePointVersion
                    + " is not installed on this machine. "
                    + " FeatureAdmin will close now.";
                MessageBox.Show(msg);
                return;
            }
            // We could also check SPFarm.Local.CurrentUserIsAdministrator(true)
            // but it seems that non-farm admins are already trapped by SPFarm.Local == null

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmMain());
        }

19 Source : Program.cs
with BSD 3-Clause "New" or "Revised" License
from ActuarialIntelligence

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Main());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from AdamWhiteHat

[STAThread]
		static void Main()
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			Application.ThreadException += Application_ThreadException;
			Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
			AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
			Application.Run(new MainForm());
		}

19 Source : Program.cs
with The Unlicense
from ADeltaX

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var form = new Form1();
            form.Width = 609;
            form.Height = 639;

            Application.Run(form);
        }

19 Source : Program.cs
with GNU General Public License v3.0
from Aekras1a

[STAThread]
        private static void Main(string[] args)
        {
            KoiInfo.Init();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ConfigWindow());
        }

19 Source : Program.cs
with MIT License
from Aemony

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FormSteamID64Editor());
        }

19 Source : Program.cs
with MIT License
from Aeroblast

[STAThread]
        static void Main(string[] args)
        {
#if !DEBUG
            try
            {
#endif
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                if (args.Length > 0)
                    if (File.Exists(args[0]))
                    {
                        ReadBook(args[0]);
                    }
                    else { MessageBox.Show("文件不存在:" + args[0]); }
                else
                {
                    OpenFileDialog dialog = new OpenFileDialog();
                    dialog.Multiselect = false;
                    dialog.replacedle = "请选择书";
                    dialog.Filter = "ePUB电子书(*.epub)|*.epub";
                    if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        ReadBook(dialog.FileName);
                    }
                }
                try
                {
                    Util.DeleteDir(cachePath);
                }
                catch (Exception) { }
#if !DEBUG
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
#endif
        }

19 Source : Program.cs
with Apache License 2.0
from aequabit

[STAThread]
        static void Main()
        {
            /**
             * Check if the loader is already running.
             */
            bool result;
            var mutex = new System.Threading.Mutex(true, "tcp-moe-client", out result);
            if (!result)
            {
                UI.MsgBox.Show("Only one instance of tcp-moe can be running at a time.", "Only one instance", MessageBoxIcon.Error);
                return;
            }

            /**
             * Load the embedded replacedemblies.
             */
            AppDomain.CurrentDomain.replacedemblyResolve += new ResolveEventHandler(CurrentDomain_replacedemblyResolve);
            Embeddedreplacedembly.Load("tcp_moe_client.replacedemblies.Newtonsoft.Json.dll", "Newtonsoft.Json.dll");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var worker = new Clreplacedes.Worker();
            Application.Run(worker.Satisfy());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from aerdogan

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmMain());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from aerdogan

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmRedis());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from AgentRev

[STAThread]
        static void Main()
        {
#if !DEBUG
            try
            {
#endif
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
#if !DEBUG
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString() + "\n\n\nPlease take a screenshot of this error and send it to [email protected]\n\nThe application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
#endif
        }

19 Source : Program.cs
with GNU General Public License v3.0
from AgentRev

[STAThread]
        static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString() + "\n\n\nThe application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

19 Source : Program.cs
with GNU General Public License v3.0
from AgentRev

[STAThread]
        static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString() + "\n\n\nPlease take a screenshot of this error and send it to [email protected]\n\nThe application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

19 Source : Program.cs
with GNU General Public License v3.0
from aglab2

[STAThread]
        static void Main()
        {
            AppDomain.CurrentDomain.replacedemblyResolve += CurrentDomain_replacedemblyResolve;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

19 Source : Program.cs
with GNU General Public License v3.0
from aglab2

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Application.ThreadException += new ThreadExceptionEventHandler(Form1_UIThreadException);
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            AppDomain.CurrentDomain.replacedemblyResolve += CurrentDomain_replacedemblyResolve;

            Application.Run(new MainWindow());
            Environment.Exit(Environment.ExitCode);
        }

19 Source : Mappalachia.cs
with GNU General Public License v3.0
from AHeroicLlama

[STAThread]
		static void Main()
		{
			try
			{
				Application.EnableVisualStyles();
				Application.SetCompatibleTextRenderingDefault(false);
				Application.Run(new FormMaster());
			}
			catch (Exception e)
			{
				Notify.Error("Mappalachia encountered an unexpected error and must close.\n" +
					IOManager.genericExceptionHelpText +
					e);

				IOManager.Cleanup();

				// Choosing to not save settings, since we just crashed it's likely safer to not keep them.
			}
		}

19 Source : Program.cs
with GNU General Public License v3.0
from ahmed605

[STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            /*
            Version envVer = Environment.Version;
            if (envVer.Major <= 2 && envVer.Revision < 1435) // 2.0 SP1 (http://en.wikipedia.org/wiki/.NET_Framework_version_list)
            {
                MessageBox.Show("It appears that you are not running the latest version of the .NET Framework.\n\n" +
                    "SparkIV requires that you atleast have both .NET Framework 2.0 SP1 and 3.0 installed. " + 
                    "Alternatively an install of .NET Framework 3.5 will install both these components.",
                    "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
             */

            Application.Run(new MainForm());
        }

19 Source : Program.cs
with MIT License
from ahm3tcelik

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmLogin());
        }

See More Examples