C#屏幕录像控件代码

这是一个使用C#编写的屏幕录像控件代码示例,包括了启动、暂停、停止录制的功能。通过WMEncoderLib库,实现了视频压缩选项选择、声音录制开关、屏幕区域选择以及快捷键设置等功能。
摘要由CSDN通过智能技术生成

录像控件Demo 下载:
http://hocor.cn/sc.rar

下面是主要代码,

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WMEncoderLib;
using System.Runtime.InteropServices;
using Microsoft.Win32;
using System.Threading;
using System.IO;
using System.Drawing.Drawing2D;

namespace F.ScreenCamera
{
public partial class MainForm : Form
{

//有关系统托盘

//Win32

//成员

///
// 程序初始化
///private void AppInit()
{
enc = new WMEncoderClass();
LoadSeting();
}
// 设置皮肤
//private void SetSkin(string SkinName)
{
this.skin.SerialNumber = "";
this.skin.SkinFile = "Skin\\" + SkinName + ".ssk";
}
// 初始压缩选项列表
///private void InitCompression()
{
//
ConfigManager.AppSetings appseting = new ConfigManager.AppSetings();
string Compression = appseting.ReadKeyValue("Compression");
//
enc = new WMEncoderClass();
wspim = enc.SourcePluginInfoManager;
wspim.Refresh();
IWMEncProfileCollection wpfc = enc.ProfileCollection;
IWMEncProfile wp;
this.CompressionOptionListBox.Items.Clear();
for (int i = 0; i < wpfc.Count; i++)
{

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值