Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET
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 12-May-13 20:06pm
Edited 12-May-13 23:35pm
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
v3
Comments
Varun_nayak at 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.
Code-Hunt at 13-May-13 3:35am
   
I updated my answer..please check..and let me know..
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 13 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100