예제 #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            CheckVersion();

            //Add Excluded windows
            ExcludedWindowCaptions.Add("ASUS_Check");
            ExcludedWindowCaptions.Add("NVIDIA GeForce Overlay");
            ExcludedWindowCaptions.Add("zVirtualDesktop Settings");

            //Run the main form
            Application.Run(MainForm = new frmMain());
        }
예제 #2
0
        static void Main(string[] args)
        {
            if (args.Length > 1)
            {
                if (args[0] == "intptr")
                {
                    Window win = new Window((IntPtr)Convert.ToInt32(args[1]));
                    win.MoveToDesktop(Convert.ToInt32(args[2]));
                    win.GoToDesktop();
                }

                if (args[0] == "title")
                {
                    Window.FindWindowMatch(args[1]);
                    if ((int)Window.FoundWindowHandle != 0)
                    {
                        Window win = new Window(Window.FoundWindowHandle);
                        win.MoveToDesktop(Convert.ToInt32(args[2]));
                        win.GoToDesktop();
                    }
                }

                Console.WriteLine("Found Handle: {0}", Window.FoundWindowHandle);

                return;
            }
            else
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //CheckVersion();

                //Add Excluded windows
                ExcludedWindowCaptions.Add("ASUS_Check");
                ExcludedWindowCaptions.Add("NVIDIA GeForce Overlay");
                ExcludedWindowCaptions.Add("zVirtualDesktop Settings");

                //Run the main form
                Application.Run(MainForm = new frmMain());
            }
        }