Monday, 6 April 2015

Capture Screen Shot Automatically Using Bitmap in Window Application Or Web Application C#

Capture Screen Shot Automatically

Capturing Screenshots System Automatically in Bitmap Images Save To Folder in Window Application Or Web Application.

                            DEMO




                        C# CODING


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Imaging;


public partial class ScreeeCapturen : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        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(@"D:\Capturing\CapturingImage.bmp"ImageFormat.Bmp);


//bitmap.Save(@"D:\Capturing\CapturingImage.jpg", ImageFormat.Bmp);

  //bitmap.Save(@"D:\Capturing\CapturingImage.png", ImageFormat.Bmp);


  //bitmap.Save(@"D:\Capturing\CapturingImage.bmp", ImageFormat.Bmp);

    }

}


















0 comments:

Post a Comment