benshepherd icon

ScreenCapture class

benshepherd | PRO | 04/04/13 10:13:18 PM UTC | 0 ⭐ | 365 👁️ | Never ⏰ | []
C# |

480 B

|

None

|

0 👍

/

0 👎

    public static class ScreenCapture
    {
        public static Bitmap Fullscreen()
        {
            using (Bitmap bm = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height))
            {
                using (Graphics g = Graphics.FromImage(bm))
                {
                    g.CopyFromScreen(Point.Empty, Point.Empty, Screen.PrimaryScreen.Bounds.Size);
                }
 
                return bm;
            }
        }
    }

Comments