Take Screen Shot Of Page
- using System;
- using System.Drawing;
- using System.Drawing.Imaging;
- using System.Windows.Forms;
- public static void Capture(string CapturedFilePath)
- {
- Bitmap bitmap = new Bitmap
- (Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
-
- Graphics graphics = Graphics.FromImage(bitmap as System.Drawing.Image);
- graphics.CopyFromScreen(25, 25, 25, 25, bitmap.Size);
-
- bitmap.Save(CapturedFilePath, ImageFormat.Bmp);
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- Capture( "E:/ScreenShot.bmp");
- }
No comments:
Post a Comment