找传奇、传世资源到传世资源站!

<赞>c#调用本地摄像头录制视频并保存

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

录制视频为.wmv格式,8秒钟的视频700多k
from clipboard
from clipboardusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using SheXiangTou;namespace SheXiangTouTest{ public partial class Form1 : Form { SheXiangTou.mSheXiangTou msxt = null; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { this.MaximumSize = new Size(this.Width, this.Height); this.MinimumSize = new Size(this.Width, this.Height); try { msxt = new mSheXiangTou(pictureBox1); List<string> temp = null; if ((temp = msxt.GetVideoDevicesNameList) != null) { foreach (string str in temp) { comboBox1.Items.Add(str); } comboBox1.SelectedIndex = 0; } Open.Click = new EventHandler(Open_Click); Close.Click = new EventHandler(msxt.Close_Click); LuXiang.Click = new EventHandler(msxt.LuXiang_Click); Stop.Click = new EventHandler(msxt.TingZhi_Click); PaiZhao.Click = new EventHandler(msxt.PaiZhao_Click); FormClosing = new FormClosingEventHandler(msxt.Form_FormClosing); } catch (Exception q) { MessageBox.Show(q.Message); Application.Exit(); } } void Open_Click(object sender, EventArgs e) { if (comboBox1.SelectedIndex == -1) return; msxt.Open_Click(comboBox1.SelectedIndex); } private void isShowTimeC_CheckedChanged(object sender, EventArgs e) { msxt.SetShowTime = isShowTimeC.Checked; } }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复