C#屏幕录制程序, [英] C# Screen Recording program,

查看:89
本文介绍了C#屏幕录制程序,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 使用系统; 
使用 System.Collections.Generic;
使用 System.ComponentModel;
使用 System.Data;
使用 System.Drawing;
使用 System.Linq;
使用 System.Text;
使用 System.Windows.Forms;

命名空间 Screen_Recording
{
public partial class Form1:Form
{
public Form1()
{
InitializeComponent();
}
位图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 <> span sender,EventArgs e)
{
bmp = new 位图(Screen.PrimaryScreen.WorkingArea.Width ,
Screen.PrimaryScreen.WorkingArea.Height);
gr = Graphics.FromImage(bmp);
gr.CopyFromScreen( 0 0 0 0 new 大小(bmp.Width,bmp.Height));
pictureBox1.Image = bmp;
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
}
}
}



在我的表格中我添加了两个按钮开始停止,当我按START时,我的表单开始显示我的系统屏幕表格,并在按下 STOP 按钮停止。



现在我想保存它(整个视频无论我在电脑屏幕上做什么,按下开始后按钮),特别是文件夹,

想要发送一些邮件ID。

任何人可以帮我吗?

注意:它的桌面应用程序使用C#



问候,

Varun Nayak

解决方案

< blockquote>但想法,保存计时器点击的任何内容,但请参阅:

http://msdn.microsoft.com/en-us/library/ms142147.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/ms142148.aspx [ ^ ]。



那'所有你需要的。



-SA


查看此链接

http://www.mindfiresolutions .com /如何采取截图 - 编程方式 - 并将其邮寄给C-647.php [ ^ ]

http://www.csharphelp.com/2006/11/capturing-the-screen-image -using-c / [ ^ ]

http://www.take37.com/programmatically-take-screenshot-using-c/ [ ^ ]

希望这会对你有所帮助....



视频:

http://www.youtube.com/watch?v=8wnNIpSz55w [ ^ ]

在电影屏幕上捕捉活动 [ ^ ]

http://stackoverflow.com/questions/4201403/capture-s creen-video-c-sharp-net-in-a-background-process-in-windows-xp [ ^ ]


虽然解决方案1和解决方案2很棒,但您需要使用某些库或外部软件。如果不是不可能的话,在普通的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

解决方案

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


Check this links
http://www.mindfiresolutions.com/How-to-take-screenshot-programmatically-and-mail-it-in-C-647.php[^]
http://www.csharphelp.com/2006/11/capturing-the-screen-image-using-c/[^]
http://www.take37.com/programmatically-take-screenshot-using-c/[^]
Hope this will help you....

Video:
http://www.youtube.com/watch?v=8wnNIpSz55w[^]
Capture Activities on Screen in a Movie[^]
http://stackoverflow.com/questions/4201403/capture-screen-video-c-sharp-net-in-a-background-process-in-windows-xp[^]


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.


这篇关于C#屏幕录制程序,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆