Click here to Skip to main content
15,881,424 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Screen_Recording
{
    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;
        }
    }
}

In My form I add two button "Start" and "Stop", when I am pressing START, My form start to showing My System Screen On form, and after pressing "STOP" button Its stop.

Now i Want to save it(Whole Video whatever I am doing in my computer Screen, after pressing "START" button), in particular folder,
And want to send it On some mail id.
Anyone one Can help me for it??
Noted: Its desktop application using C#

regards,
Varun Nayak
Posted
Updated 12-May-13 22:35pm
v4

But idea, to save anything on timer click, but please see:
http://msdn.microsoft.com/en-us/library/ms142147.aspx[^],
http://msdn.microsoft.com/en-us/library/ms142148.aspx[^].

That's all you need.

—SA
 
Share this answer
 
 
Share this answer
 
v3
Comments
Varun_nayak 13-May-13 3:25am    
Thank you very Much for your response,
In these link It showing How to save Screen Capturing Image, but I want TO save Screen Capturing Video.
[no name] 13-May-13 3:35am    
I updated my answer..please check..and let me know..
Though solution 1 and Solution 2 is great, point is you need to use either some library or external software. Doing in plain C# (without library) would be little difficult if not impossible.
 
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