Click here to Skip to main content
15,915,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am developing a project for school like digital lab. There, the teacher have to capture screen of particular student. Whatever the students do the teacher can view their activities. This project has been developing in windows form application. Please any can give a sample code to complete my project.

Thanks & Regards,
Mary.
Posted
Updated 12-Apr-12 23:46pm
v2

1 solution

You can use timer /windows services for define a time interval after that screen captured.
To save captured image,you can make share folder on Teacher's System.
C#
private void tick(object sender, EventArgs e)
        {
            try
            {
                
                System.Drawing.Bitmap Bitmap;
                Graphics Graps;
                Bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
                Graps = Graphics.FromImage(Bitmap);
                Random rr = new Random();
                string s = rr.Next().ToString();
                Graps.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
                Bitmap.Save(@"\\192.168.1.12\Share" + s + ".Jpeg", ImageFormat.Jpeg);
                //this.Show();
            }
            catch (Exception ex)
            {
            }
        }

Teacher can see these images on his system.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900