public static void TakeFullScreen() { Screen scr = PaintHelp.getCursorScreen(); Bitmap bmp = PaintHelp.GetScreen(new Point(scr.Bounds.X, scr.Bounds.Y), new Size(scr.Bounds.Width, scr.Bounds.Height)); new EditorEx(bmp); }
private void ScreenshotHelper_Load(object sender, EventArgs e) { //Point topLeft = PaintHelp.GetTopLeftMonitorPoint(); Point offsetPoint = new Point(fullRect.X, fullRect.Y); this.Location = offsetPoint; this.bmpDesktop = PaintHelp.GetScreen(offsetPoint, fullRect.Size); this.fntMeasure = PaintHelp.GetFont("Cambria", 48, FontStyle.Regular); }
public static void TakeWindowScreen() { //takes a SS of the foreground window, needs to be completed //dllimport -> GetForegroundWindow() /*var hWnd = GetForegroundWindow(); * Rectangle rectBuffer = new Rectangle(); * GetWindowRect(hWnd, ref rectBuffer); * Bitmap bmp = PaintHelp.GetScreen(rectBuffer.Location, rectBuffer.Size); * new editor(bmp);*/ IntPtr hWnd = GetForegroundWindow(); RECT recBuff; GetWindowRect(hWnd, out recBuff); Rectangle recReal = new Rectangle(); recReal.X = recBuff.Left; recReal.Y = recBuff.Top; recReal.Width = recBuff.Right - recBuff.Left + 1; recReal.Height = recBuff.Bottom - recBuff.Top + 1; new EditorEx(PaintHelp.GetScreen(recReal.Location, recReal.Size)); }