Herstellen eines Screenshot:
int StartX, StartY; int Width, Height; StartX = (onlyForm) ? (this.Left) : (0); StartY = (onlyForm) ? (this.Top) : (0); Width = (onlyForm) ? (this.Width) : (Screen.PrimaryScreen.Bounds.Width); Height = (onlyForm) ? (this.Height) : (Screen.PrimaryScreen.Bounds.Height); using (Bitmap Screenshot = new Bitmap(Width, Height)) { using (Graphics G = Graphics.FromImage(Screenshot)) { G.CopyFromScreen(StartX, StartY, 0, 0, new Size(Width, Height), CopyPixelOperation.SourceCopy); } Screenshot.Save("Bildschirm.png", System.Drawing.Imaging.ImageFormat.Png); }