How do I take a screenshot of the entire screen and write it all into a .png or .jpg file? Actually, I myself will perform the recording by pressing a button, but how to make a screenshot? Can someone tell me? Pressing the Print Screen button disappears immediately. And for the screen to appear in PictureBox1. Thanks everyone for the help.
Answer 1, authority 100%
You can do this:
Graphics graph = null; var bmp = new Bitmap (Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); graph = Graphics.FromImage (bmp); graph.CopyFromScreen (0, 0, 0, 0, bmp.Size); bmp.Save ("filename");
How to put a bitmap in picchure boxing, guess?