欢迎来到天天文库
浏览记录
ID:14035779
大小:43.85 KB
页数:5页
时间:2018-07-25
《c#调用摄像头拍摄,截图,视频》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、C#调用摄像头拍摄,截图,视频 (2013-01-2914:35:43)分类: C#cs类:usingSystem.Runtime.InteropServices;usingSystem.Drawing.Imaging;namespaceWindowsFormsApplication2{ classPick { privateconstintWM_USER=0x400; privateconstintWS_CHILD=0x40000000; pr
2、ivateconstintWS_VISIBLE=0x10000000; privateconstintWM_CAP_START=WM_USER; privateconstintWM_CAP_STOP=WM_CAP_START+68; privateconstintWM_CAP_DRIVER_CONNECT=WM_CAP_START+10; privateconstintWM_CAP_DRIVER_DISCONNECT=WM_CAP_START+
3、11; privateconstintWM_CAP_SAVEDIB=WM_CAP_START+25; privateconstintWM_CAP_GRAB_FRAME=WM_CAP_START+60; privateconstintWM_CAP_SEQUENCE=WM_CAP_START+62; privateconstintWM_CAP_FILE_SET_CAPTURE_FILEA=WM_CAP_START+20; privat
4、econstintWM_CAP_SEQUENCE_NOFILE=WM_CAP_START+63; privateconstintWM_CAP_SET_OVERLAY=WM_CAP_START+51; privateconstintWM_CAP_SET_PREVIEW=WM_CAP_START+50; privateconstintWM_CAP_SET_CALLBACK_VIDEOSTREAM=WM_CAP_START+6; privatecon
5、stintWM_CAP_SET_CALLBACK_ERROR=WM_CAP_START+2; privateconstintWM_CAP_SET_CALLBACK_STATUSA=WM_CAP_START+3; privateconstintWM_CAP_SET_CALLBACK_FRAME=WM_CAP_START+5; privateconstintWM_CAP_SET_SCALE=WM_CAP_START+53; privateconst
6、intWM_CAP_SET_PREVIEWRATE=WM_CAP_START+52; privateIntPtrhWndC; privateboolbStat=false; privateIntPtrmControlPtr; privateintmWidth; privateintmHeight; privateintmLeft; privateintmTop; /// /
7、//初始化摄像头 /// ///控件的句柄 ///开始显示的左边距 ///开始显示的上边距 ///要显示的宽度 ///要显示的长度 publicPick(IntPtrhandle,intleft,inttop,intwidth,intheight) { mControlPtr=handle; mWidth=width;
8、 mHeight=height; mLeft=left; mTop=top; } [DllImport("avicap32.dll")] privatestaticexternIntPtrcapCreateCaptureWindowA(byte[]lpszWindowName,intdwStyle,intx,inty,intnWidth,intnHeight,IntPtrhW
此文档下载收益归作者所有