【实例简介】
得安装摄像头驱动!!
摄像头监控录像源代码,里面有很详细的代码,可以直接拿来驱动摄像头程序,也可以直接用来学习,代码不可以商用哦
【实例截图】
【核心代码】
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace Ex13_09
{
public class cVideo //摄像头控制类
{
//导入API函数
[DllImport("avicap32.dll")]
private static extern IntPtr capCreateCaptureWindowA(byte[] lpszWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, int nID);
[DllImport("avicap32.dll")]
private static extern int capGetVideoFormat(IntPtr hWnd, IntPtr psVideoFormat, int wSize);
[DllImport(