Esempio n. 1
0
        public static void RestoreWindow(IWin32Window window)
        {
            IntPtr hWnd = window.Handle;

            SafeNativeMethods.ShowWindow(hWnd, NativeConstants.SW_RESTORE);
            GC.KeepAlive(window);
        }
Esempio n. 2
0
        public static void RestoreWindow(IWin32Window window)
        {
#if false
            IntPtr hWnd = window.Handle;
            SafeNativeMethods.ShowWindow(hWnd, NativeConstants.SW_RESTORE);
            GC.KeepAlive(window);
#endif
            Console.WriteLine("PORT: RestoreWindow not implemented");
        }
        public void FocusFirstInstance()
        {
            IntPtr ourHwnd = this.ReadHandleFromFromMappedFile();

            if (ourHwnd != IntPtr.Zero)
            {
                if (SafeNativeMethods.IsIconic(ourHwnd))
                {
                    SafeNativeMethods.ShowWindow(ourHwnd, NativeConstants.SW_RESTORE);
                }

                SafeNativeMethods.SetForegroundWindow(ourHwnd);
            }
        }