c#捕获笔记本内置摄像头源代码
CVideo cv; int hwnd = 0; private void Form1_Load(object sender, EventArgs e) { cv = new CVideo( this.panel1.Handle,0,0,this.panel1.Width,this.panel1.Height); hwnd=cv.Start(); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { cv.Stop(); } private void Form1_SizeChanged(object sender, EventArgs e) { CVideo.SetWindowPos(hwnd, 1, 0, 0, this.Width, this.Height, 6); } priv ate void button1_Click(object sender, EventArgs e) { cv.GrabImage("photos\\"+DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")+".bmp"); MessageBox.Show("ok"); }
用户评论
没怎么用到
资料不错 正是需要的 谢谢
很好用的资料!