Esempio n. 1
0
        public void ActivateWindow(IntPtr handle)
        {
            User32NativeMethods.SetForegroundWindow(handle);

            int style = User32NativeMethods.GetWindowLong(handle, InteropConstants.GWL_STYLE);

            if ((style & InteropConstants.WS_MINIMIZE) == InteropConstants.WS_MINIMIZE)
            {
                User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE);
            }
        }
Esempio n. 2
0
 public void MaximizeWindow(IntPtr handle)
 {
     User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_SHOWMAXIMIZED);
 }