|
The main use of CopyFromScreen Graphics function gets shot
Here is a program to obtain the current theme, and this.png the file name.
We need to add a reference to:
using System.Drawing;
Main program:
Bitmap bitmap = new Bitmap (Screen.AllScreens [0] .Bounds.Size.Width, Screen.AllScreens [0] .Bounds.Size.Height);
Graphics g = Graphics.FromImage (bitmap);
g.CopyFromScreen (0, 0, 0, 0, Screen.AllScreens [0] .Bounds.Size);
g.Dispose ();
bitmap.Save ( "this.png"); |
|
|
|