基本信息
源码名称:<赞>c#调用本地摄像头录制视频并保存
源码大小:11.59M
文件格式:.rar
开发语言:C#
更新时间:2018-08-29
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 5 元 
   源码介绍
录制视频为.wmv格式,8秒钟的视频700多k


using 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;
        }
    }
}