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);

    }

}



First - Add NEw Web Form - Add NameSpaces For 

Call Windows Activity





Next - Solution Explorer - Project Name - Right Click - Add Reference 





Next - Select Framwork  - System.Windows.Forms  - OK





Next - Add The Form Page Load Capturing Coding





Next - Run [F5]  - Page Load Get Screen Shot & Saved To Given Path.






Open & View  The Captured Picture





0 comments:

Post a Comment