public static bool CaptureWindow(Control control, ref Bitmap bitmap) { Graphics graphics = Graphics.FromImage(bitmap); IntPtr lParam = new IntPtr(12); IntPtr hdc = graphics.GetHdc(); HelpWin32.SendMessage(control.Handle, 791, hdc, lParam); graphics.ReleaseHdc(hdc); graphics.Dispose(); return(true); }
public static IntPtr SendMessage(IntPtr hWnd, int msg, int wParam) { return(HelpWin32.SendMessage(hWnd, msg, wParam, "")); }