关闭

关闭

关闭

封号提示

内容

首页 VB如何实现摄像头数据的捕获与显示.doc

VB如何实现摄像头数据的捕获与显示.doc

VB如何实现摄像头数据的捕获与显示.doc

上传者: yuanshik812 2011-09-19 评分 0 0 0 0 0 0 暂无简介 简介 举报

简介:本文档为《VB如何实现摄像头数据的捕获与显示doc》,可适用于IT/计算机领域,主题内容包含一、你要有视频捕捉设备二、正确安装在你的电脑上。三、新建一个VB项目添加一个ModulePrivateDeclareFunctioncapCreat符等。

一、你要有视频捕捉设备二、正确安装在你的电脑上。三、新建一个VB项目添加一个ModulePrivateDeclareFunctioncapCreateCaptureWindowLib"avicapdll"Alias"capCreateCaptureWindowA"(ByVallpszWindowNameAsString,ByValdwStyleAsLong,ByValxAsLong,ByValyAsLong,ByValnWidthAsLong,ByValnHeightAsLong,ByValhWndParentAsLong,ByValnIDAsLong)AsLongPrivateConstWSCHILD=HPrivateConstWSVISIBLE=HPrivateConstWMUSER=HPrivateConstWMCAPSTART=HPrivateConstWMCAPEDITCOPY=(WMCAPSTART)PrivateConstWMCAPDRIVERCONNECT=(WMCAPSTART)PrivateConstWMCAPSETPREVIEWRATE=(WMCAPSTART)PrivateConstWMCAPSETOVERLAY=(WMCAPSTART)PrivateConstWMCAPSETPREVIEW=(WMCAPSTART)PrivateConstWMCAPDRIVERDISCONNECT=(WMCAPSTART)PrivateDeclareFunctionSendMessageLib"user"Alias"SendMessageA"(ByValhwndAsLong,ByValwMsgAsLong,ByValwParamAsLong,lParamAsAny)AsLongPrivatePreviewHandleAsLongPublicFunctionCreateCaptureWindow(hWndParentAsLong,OptionalxAsLong=,OptionalyAsLong=,OptionalnWidthAsLong=,OptionalnHeightAsLong=,OptionalnCameraIDAsLong=)AsLongPreviewHandle=capCreateCaptureWindow("Video",WSCHILDWSVISIBLE,x,y,nWidth,nHeight,hWndParent,)SendMessagePreviewHandle,WMCAPDRIVERCONNECT,nCameraID,SendMessagePreviewHandle,WMCAPSETPREVIEWRATE,,SendMessagePreviewHandle,WMCAPSETOVERLAY,,SendMessagePreviewHandle,WMCAPSETPREVIEW,,CreateCaptureWindow=PreviewHandleEndFunctionPublicFunctionCapturePicture(nCaptureHandleAsLong)AsStdPictureClipboardClearSendMessagenCaptureHandle,WMCAPEDITCOPY,,SetCapturePicture=ClipboardGetDataEndFunctionPublicSubDisconnects(nCaptureHandleAsLong,OptionalnCameraID=)SendMessagenCaptureHandle,WMCAPDRIVERDISCONNECT,nCameraID,EndSub四、在form上添加一个PictureBox命名为PicCapture一个按钮Caption设为SavePicDimVideoHandleAsLongPrivateSubFormLoad()VideoHandle=CreateCaptureWindow(PicCapturehwnd)EndSubPrivateSubCommandClick()DimxAsStdPictureSetx=CapturePicture(VideoHandle)SavePicturex,"c:abmp"EndSubPrivateSubFormUnload(CancelAsInteger)DisconnectsVideoHandleEndSub

用户评论(0)

0/200

精彩专题

上传我的资料

每篇奖励 +2积分

资料评价:

/2
1下载券 下载 加入VIP, 送下载券

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部