关闭

关闭

关闭

封号提示

内容

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

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

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

yuanshik812
2011-09-19 0人阅读 0 0 0 暂无简介 举报

简介:本文档为《VB如何实现摄像头数据的捕获与显示doc》,可适用于IT/计算机领域

一、你要有视频捕捉设备二、正确安装在你的电脑上。三、新建一个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)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

评分:

/2

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部

举报
资料