Print Screen or Screenshot using C#

A simple add-on that will capture the user screen and automatically send it to the system administrator.
This add-on will be plug-in into our existing systems. It will be automatically triggered if an error is detected so the system administrator can analyze the problem on-hand before going to the user to fix the error.

using System.Drawing;
using System.Drawing.Imaging;
using System.Media;
using System.Windows.Forms;

public partial class _Default : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
Bitmap printscreen = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);

Graphics graphics = Graphics.FromImage(printscreen);

graphics.CopyFromScreen(0, 0, 0, 0, printscreen.Size);

printscreen.Save(@”C:\printscreen.jpg”, ImageFormat.Jpeg);  


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s