Example #1
0
        public static Bitmap CaptureWindow(IntPtr hWnd)
        {
            if (!Win32Helper.BringWindowToTop(hWnd))
            {
                return(null);
            }

            if (!Win32Helper.SetForegroundWindow(hWnd))
            {
                return(null);
            }

            return(CaptureHandle(hWnd));
        }
Example #2
0
 private void ShowErrorMessage(string message)
 {
     Win32Helper.BringWindowToTop(this.Handle);
     Win32Helper.SetForegroundWindow(this.Handle);
     MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 }