Ejemplo 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);
            }
        }
Ejemplo n.º 2
0
 public void MaximizeWindow(IntPtr handle)
 {
     User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_SHOWMAXIMIZED);
 }