Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am doing web application where I need to record the screen and save it. Is there any software to add in project because I referred many of the links but nothing helped me .This is the link which suits me better but I don't know to use it in my project.

The code from the link is


C#
public partial class Form1 : Form
   {
       public Form1()
       {
           InitializeComponent();
       }
       Bitmap bmp;
       Graphics gr;

       private void btn_start_Click(object sender, EventArgs e)
       {
           timer1.Start();
       }

       private void btn_stop_Click(object sender, EventArgs e)
       {
           timer1.Stop();
       }

       private void timer1_Tick(object sender, EventArgs e)
       {
           bmp = new Bitmap(Screen.PrimaryScreen.WorkingArea.Width,
                            Screen.PrimaryScreen.WorkingArea.Height);
           gr = Graphics.FromImage(bmp);
           gr.CopyFromScreen(0, 0, 0, 0, new Size(bmp.Width, bmp.Height));
           pictureBox1.Image = bmp;
           pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
       }
   }


After creating a class and adding the code to it how to call the class? Please guide me step by step of what to do and how to add the above code in my project .Thanks in advance !!
Posted
Updated 2-Apr-18 19:49pm
v6

1 solution

You are not creating class here, you are triggering events from the controls of Asp.net like Timer and Buttons.
 
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