VB如何实现摄像头数据的捕获与显示_第1页
VB如何实现摄像头数据的捕获与显示_第2页
VB如何实现摄像头数据的捕获与显示_第3页
VB如何实现摄像头数据的捕获与显示_第4页
VB如何实现摄像头数据的捕获与显示_第5页
免费预览已结束,剩余10页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、VB 如何实现摄像头数据的捕获与显示2009-04-2010:07或如下:PublicConstWM_USER=&H400TypePOINTAPIxAsLongyAsLongEndTypeDeclareFunctionSendMessageLibuser32AliasSendMessageA(ByValhWndAsLong,ByValwMsgAsLong,ByValwParamAsInteger,ByVallParamAsLong)AsLongDeclareFunctionSendMessageSLibuser32AliasSendMessageA(ByValhWndAsLong,By

2、ValwMsgAsLong,ByValwParamAsInteger,ByVallParamAsString)AsLong/WindowMessagesWM_CAP.whichcanbesenttoanAVICAPwindow/DefinesstartofthemessagerangePublicConstWM_CAP_START=WM_USERPublicConstWM_CAP_GET_CAPSTREAMPTR=WM_CAP_START+1PublicConstWM_CAP_SET_CALLBACK_ERROR=WM_CAP_START+2PublicConstWM_CAP_SET_CALL

3、BACK_STATUS=WM_CAP_START+3PublicConstWM_CAP_SET_CALLBACK_YIELD=WM_CAP_START+4PublicConstWM_CAP_SET_CALLBACK_FRAME=WM_CAP_START+5PublicConstWM_CAP_SET_CALLBACK_VIDEOSTREAM=WM_CAP_START+6PublicConstWM_CAP_SET_CALLBACK_WAVESTREAM=WM_CAP_START+7PublicConstWM_CAP_GET_USER_DATA=WM_CAP_START+8PublicConstWM

4、_CAP_SET_USER_DATA=WM_CAP_START+9PublicConstWM_CAP_DRIVER_CONNECT=WM_CAP_START+10PublicConstWM_CAP_DRIVER_DISCONNECT=WM_CAP_START+11PublicConstWM_CAP_DRIVER_GET_NAME=WM_CAP_START+12PublicConstWM_CAP_DRIVER_GET_VERSION=WM_CAP_START+13PublicConstWM_CAP_DRIVER_GET_CAPS=WM_CAP_START+14PublicConstWM_CAP_

5、FILE_SET_CAPTURE_FILE=WM_CAP_START+20PublicConstWM_CAP_FILE_GET_CAPTURE_FILE=WM_CAP_START+21PublicConstWM_CAP_FILE_ALLOCATE=WM_CAP_START+22PublicConstWM_CAP_FILE_SAVEAS=WM_CAP_START+23PublicConstWM_CAP_FILE_SET_INFOCHUNK=WM_CAP_START+24PublicConstWM_CAP_FILE_SAVEDIB=WM_CAP_START+25PublicConstWM_CAP_

6、EDIT_COPY=WM_CAP_START+30PublicConstWM_CAP_SET_AUDIOFORMAT=WM_CAP_START+35PublicConstWM_CAP_GET_AUDIOFORMAT=WM_CAP_START+36PublicConstWM_CAP_DLG_VIDEOFORMAT=WM_CAP_START+41PublicConstWM_CAP_DLG_VIDEOSOURCE=WM_CAP_START+42PublicConstWM_CAP_DLG_VIDEODISPLAY=WM_CAP_START+43PublicConstWM_CAP_GET_VIDEOFO

7、RMAT=WM_CAP_START+44PublicConstWM_CAP_SET_VIDEOFORMAT=WM_CAP_START+45PublicConstWM_CAP_DLG_VIDEOCOMPRESSION=WM_CAP_START+46PublicConstWM_CAP_SET_PREVIEW=WM_CAP_START+50PublicConstWM_CAP_SET_OVERLAY=WM_CAP_START+51PublicConstWM_CAP_SET_PREVIEWRATE=WM_CAP_START+52PublicConstWM_CAP_SET_SCALE=WM_CAP_STA

8、RT+53PublicConstWM_CAP_GET_STATUS=WM_CAP_START+54PublicConstWM_CAP_SET_SCROLL=WM_CAP_START+55PublicConstWM_CAP_GRAB_FRAME=WM_CAP_START+60PublicConstWM_CAP_GRAB_FRAME_NOSTOP=WM_CAP_START+61PublicConstWM_CAP_SEQUENCE=WM_CAP_START+62PublicConstWM_CAP_SEQUENCE_NOFILE=WM_CAP_START+63PublicConstWM_CAP_SET

9、_SEQUENCE_SETUP=WM_CAP_START+64PublicConstWM_CAP_GET_SEQUENCE_SETUP=WM_CAP_START+65PublicConstWM_CAP_SET_MCI_DEVICE=WM_CAP_START+66PublicConstWM_CAP_GET_MCI_DEVICE=WM_CAP_START+67PublicConstWM_CAP_STOP=WM_CAP_START+68PublicConstWM_CAP_ABORT=WM_CAP_START+69PublicConstWM_CAP_SINGLE_FRAME_OPEN=WM_CAP_S

10、TART+70PublicConstWM_CAP_SINGLE_FRAME_CLOSE=WM_CAP_START+71PublicConstWM_CAP_SINGLE_FRAME=WM_CAP_START+72PublicConstWM_CAP_PAL_OPEN=WM_CAP_START+80PublicConstWM_CAP_PAL_SAVE=WM_CAP_START+81PublicConstWM_CAP_PAL_PASTE=WM_CAP_START+82PublicConstWM_CAP_PAL_AUTOCREATE=WM_CAP_START+83PublicConstWM_CAP_PA

11、L_MANUALCREATE=WM_CAP_START+84/FollowingaddedpostVFW1.1PublicConstWM_CAP_SET_CALLBACK_CAPCONTROL=WM_CAP_START+85/DefinesendofthemessagerangePublicConstWM_CAP_END=WM_CAP_SET_CALLBACK_CAPCONTROL/Structures/TypeCAPDRIVERCAPSfDriverSuppliesPalettesAsLong/Candrivermakepalettes?wDeviceIndexAsLongfHasOverl

12、ayAsLongfHasDlgVideoSourceAsLongfHasDlgVideoFormatAsLongfHasDlgVideoDisplayAsLongfCaptureInitializedAsLong/Driverindexinsystem.ini/Candeviceoverlay?/HasVideosourcedlg?/HasFormatdlg?/HasExternaloutdlg?/Driverreadytocapture?hVideoInAsLonghVideoOutAsLonghVideoExtInAsLonghVideoExtOutAsLongEndType/Driver

13、Inchannel/DriverOutchannel/DriverExtInchannel/DriverExtOutchannelTypeCAPSTATUSuiImageWidthAsLonguiImageHeightAsLongfLiveWindowAsLongfOverlayWindowAsLongfScaleAsLongptScrollAsPOINTAPIfUsingDefaultPaletteAsLongpalette?fAudioHardwareAsLongfCapFileExistsAsLong/Widthoftheimage/Heightoftheimage/NowPreview

14、ingvideo?/NowOverlayingvideo?/Scaleimagetoclient?/Scrollposition/Usingdefaultdriver/dwCurrentVideoFrameAsLongdwCurrentVideoFramesDroppedAsLongdroppeddwCurrentWaveSamplesAsLongdwCurrentTimeElapsedMSAsLong/Audiohardwarepresent?Doescapturefileexist?#ofvideoframescaptd/#ofvideoframes/#ofwavesamplescaptd

15、/ElapsedcapturedurationhPalCurrentAsLongfCapturingNowAsLong/Currentpaletteinuse/Captureinprogress?TypeCAPTUREPARMSdwRequestMicroSecPerFrameAsLong/RequestedcaptureratefMakeUserHitOKToCaptureAsLong/ShowHitOKtocapdlg?wPercentDropForErrorAsLong/Giveerrormsgif(10%)fYieldAsLong/Captureviabackgroundtask?/M

16、axindexsizeinframes/Junkchunkgranularity/UseDOSbuffers?/#videobuffers,If0,/Captureaudio?/#audiobuffers,If0,FramesdwAudioBufferSizeAsLong/Sizeofaudiobufs(0=default)fDisableWriteCacheAsLong/AttempttodisablewritecacheEndTypedwReturnAsLongoperationwNumVideoAllocatedAsLongbufferswNumAudioAllocatedAsLongb

17、uffersEndType/Errorvalueafterany/Actualnumberofvideo/ActualnumberofaudiodwIndexSizeAsLong(32K)wChunkGranularityAsLong(2K)fUsingDOSMemoryAsLongwNumVideoRequestedAsLongautocalcfCaptureAudioAsLongwNumAudioRequestedAsLongautocalcvKeyAbortAsLongabortfAbortLeftMouseAsLongfAbortRightMouseAsLongfLimitEnable

18、dAsLongwTimeLimitAsLongfMCIControlAsLongfStepMCIDeviceAsLongdwMCIStartTimeAsLongdwMCIStopTimeAsLongfStepCaptureAt2xAsLongaveraging2xwStepCaptureAverageFramesAsLong/Virtualkeycausing/Abortonleftmouse?/Abortonrightmouse?/UsewTimeLimit?/Secondstocapture/UseMCIvideosource?/StepMCIdevice?/TimetostartinMS

19、/TimetostopinMS/Performspatial/TemporalaveragenTypeVIDEOHDRlpDataAsLong/addressofvideobufferdwBufferLengthAsLong/size,inbytes,oftheDatabufferdwBytesUsedAsLong/seebelowdwTimeCapturedAsLong/seebelowdwUserAsLong/user-specificdatadwFlagsAsLong/seebelowdwReserved(3)AsLong/reserved;donotuseEndType/Thetwof

20、unctionsexportedbyAVICapDeclareFunctioncapCreateCaptureWindowALibavicap32.dll(_ByVallpszWindowNameAsString,_ByValdwStyleAsLong,_ByValxAsLong,ByValyAsLong,ByValnWidthAsLong,ByValnHeightAsInteger,_ByValhWndParentAsLong,ByValnIDAsLong)AsLongDeclareFunctioncapGetDriverDescriptionALibavicap32.dll(_ByValw

21、DriverAsInteger,_ByVallpszNameAsString,_ByValcbNameAsLong,_ByVallpszVerAsString,_ByValcbVerAsLong)AsBoolean/StringIDsfromstatusanderrorcallbacks/PublicConstIDS_CAP_BEGIN=300PublicConstIDS_CAP_END=301PublicConstIDS_CAP_INFO=401/*%s*/PublicConstIDS_CAP_OUTOFMEM=402/*Outofmemory*/PublicConstIDS_CAP_FIL

22、EEXISTS=403/*File%sexists-overwriteit?*/TypeCAPINFOCHUNKfccInfoIDAsLongcopyrightlpDataAsLongcbDataAsLongEndType/ChunkID,ICOPfor/pointertodata/sizeoflpData/*CaptureStart*/*CaptureEnd*/videoinputdevice.*/PublicConstIDS_CAP_ERRORPALOP4 的/*%s*/PublicConstIDS_CAP_ERRORPALSAVE)5/*%s*/ErroropeningpaletteEr

23、rorsavingpalettePublicConstIDS_CAP_ERRORDIBSAVE=406%s*/*ErrorsavingframePublicConstIDS_CAP_DEFAVIEXT=407PublicConstIDS_CAP_DEFPALEXT=408PublicConstIDS_CAP_CANTOPEN=409/*avi*/*pal*/*Cannotopen%s*/PublicConstIDS_CAP_SEQ_MSGSTART=410capturenofvideosequencento%s.*/PublicConstIDS_CAP_SEQ_MSGSTOP=411toend

24、capture*/*SelectOKtostart/*HitESCAPEorclickPublicConstIDS_CAP_VIDEDITERR=412/*AnerroroccurredwhiletryingtorunVidEdit.*/PublicConstIDS_CAP_READONLYFILE=413read-onlyfile.*/PublicConstIDS_CAP_WRITEERROR=414file%s.nDiskmaybefull.*/PublicConstIDS_CAP_NODISKSPACE=415createacapturefileonthespecifieddevice.

25、*/PublicConstIDS_CAP_SETFILESIZE=416/*Thefile%sisa/*Unabletowriteto/*Thereisnospaceto/*SetFileSize*/PublicConstIDS_CAP_SAVEASPERCENT=417/*SaveAs:%2ld%HitEscapetoabort.*/PublicConstIDS_CAP_DRIVER_ERROR18/*Driverspecificerrormessage*/PublicConstIDS_CAP_WAVE_OPEN_ERROR/*Error:Cannotopenthewaveinputdevi

26、ce.nChecksamplesize,frequency,andchannels.*/PublicConstIDS_CAP_WAVE_ALLOC_ERROR=420/*Error:Outofmemoryforwavebuffers.*/PublicConstIDS_CAP_WAVE_PREPARE_ERR2)1R7*Error:wavebuffers.*/PublicConstIDS_CAP_WAVE_ADD_ERR42R/*Error:buffers.*/PublicConstIDS_CAP_WAVE_SIZE_ERRO23/*Error:*/CannotprepareCannotaddw

27、aveBadwavesize.PublicConstIDSCAPVIDEOOPENERR/*Error:CannotopenthePublicConstIDS_CAP_VIDEO_ALLOC_ERROR=425/*Error:Outofmemoryforvideobuffers.*/PublicConstIDS_CAP_VIDEO_PREPARE_ERROR/*Error:Cannotpreparevideobuffers.*/PublicConstIDS_CAP_VIDEO_ADD_ERROR=427/*Error:Cannotaddvideobuffers.*/PublicConstIDS

28、_CAP_VIDEO_SIZE_ERROR=428/*Error:Badvideosize.*/PublicConstIDS_CAP_FILE_OPEN_ERROR=429/*Error:Cannotopencapturefile.*/PublicConstIDS_CAP_FILE_WRITE_ERROR=430/*Error:Cannotwritetocapturefile.Diskmaybefull.*/PublicConstIDS_CAP_RECORDING_ERROR=431/*Error:Cannotwritetocapturefile.Dataratetoohighordiskfu

29、ll.*/PublicConstIDS_CAP_RECORDING_ERROR2=432/*Errorwhilerecording*/PublicConstIDS_CAP_AVI_INIT_ERROR=433/*Error:Unabletoinitializeforcapture.*/PublicConstIDSCAPNOFRAMECAPERROR=434/*Warning:Noframescaptured.nConfirmthatverticalsyncinterruptsnareconfiguredandenabled.*/PublicConstIDS_CAP_NO_PALETTE_WAR

30、N=435/*Warning:Usingdefaultpalette.*/PublicConstIDS_CAP_MCI_CONTROL_ERROR/*Error:UnabletoaccessMCIdevice.*/PublicConstIDS_CAP_MCI_CANT_STEP_ERR43R/*Error:UnabletostepMCIdevice.*/PublicConstIDS_CAP_NO_AUDIO_CAP_ERROR=438/*Error:Noaudiodatacaptured.nCheckaudiocardsettings.*/PublicConstIDS_CAP_AVI_DRAW

31、DIB_ERROR=439/*Error:Unabletodrawthisdataformat.*/PublicConstIDS_CAP_COMPRESSOR_ERROR=440/*Error:Unabletoinitializecompressor.*/PublicConstIDS_CAP_AUDIO_DROP_ERR441/*Error:Audiodatawaslostduringcapture,reducecapturerate.*/*statusstringIDs*/PublicConstIDS_CAP_STAT_LIVE_MODE=500/*Livewindow*/PublicCon

32、stIDS_CAP_STAT_OVERLAY_MODE=501/*Overlaywindow*/PublicConstIDS_CAP_STAT_CAP_INIT=502/*Settingupforcapture-Pleasewait*/PublicConstIDS_CAP_STAT_CAP_FINI=503/*Finishedcapture,nowwritingframe%ld*/PublicConstIDS_CAP_STAT_PALETTE_BUIL504/*Buildingpalettemap*/PublicConstIDS_CAP_STAT_OPTPAL_BUILD=505/*Compu

33、tingoptimalpalette*/PublicConstIDS_CAP_STAT_I_FRAMES=506/*%dframes*/PublicConstIDS_CAP_STAT_L_FRAMES=507/*%ldframes*/PublicConstIDS_CAP_STAT_CAP_L_FRAMES8/*Captured%ldframes*/PublicConstIDS_CAP_STAT_CAP_AUD=IO09/*Capturingaudio*/PublicConstIDS_CAP_STAT_VIDEOCURRENT0/*Captured%ldframes(%lddropped)%d.

34、%03dsec.*/PublicConstIDS_CAP_STAT_VIDEOAUDIO=511/*Captured%d.%03dsec.%ldframes(%lddropped)(%d.%03dfps).%ldaudiobytes(%d,%03dsps)*/PublicConstIDS_CAP_STAT_VIDEOONLY=512/*Captured%d.%03dsec.%ldframes(%lddropped)(%d.%03dfps)*/FunctioncapSetCallbackOnError(ByVallwndAsLong,ByVallpProcAsLong)AsBooleancapS

35、etCallbackOnError=SendMessage(lwnd,WM_CAP_SET_CALLBACK_ERROR,0,lpProc)EndFunctionFunctioncapSetCallbackOnStatus(ByVallwndAsLong,ByVallpProcAsLong)AsBooleancapSetCallbackOnStatus=SendMessage(lwnd,WM_CAP_SET_CALLBACK_STATUS,0,lpProc)EndFunctionFunctioncapSetCallbackOnYield(ByVallwndAsLong,ByVallpProcA

36、sLong)AsBooleancapSetCallbackOnYield=SendMessage(lwnd,WM_CAP_SET_CALLBACK_YIELD,0,lpProc)EndFunctionFunctioncapSetCallbackOnFrame(ByVallwndAsLong,ByVallpProcAsLong)AsBooleancapSetCallbackOnFrame=SendMessage(lwnd,WM_CAP_SET_CALLBACK_FRAME,0,lpProc)EndFunctionFunctioncapSetCallbackOnVideoStream(ByVall

37、wndAsLong,ByVallpProcAsLong)AsBooleancapSetCallbackOnVideoStream=SendMessage(lwnd,WM_CAP_SET_CALLBACK_VIDEOSTREAM,0,lpProc)EndFunctionFunctioncapSetCallbackOnWaveStream(ByVallwndAsLong,ByVallpProcAsLong)AsBooleancapSetCallbackOnWaveStream=SendMessage(lwnd,WM_CAP_SET_CALLBACK_WAVESTREAM,0,lpProc)EndF

38、unctionFunctioncapSetCallbackOnCapControl(ByValIwndAsLong,ByValIpProcAsLong)AsBooleancapSetCallbackOnCapControl=SendMessage(lwnd,WM_CAP_SET_CALLBACK_CAPCONTROL,0,lpProc)EndFunctionFunctioncapSetUserData(ByVallwndAsLong,ByVallUserAsLong)AsBooleancapSetUserData=SendMessage(lwnd,WM_CAP_SET_USER_DATA,0,

39、lUser)EndFunctionFunctioncapGetUserData(ByVallwndAsLong)AsLongcapGetUserData=SendMessage(lwnd,WM_CAP_GET_USER_DATA,0,0)EndFunctionFunctioncapDriverConnect(ByVallwndAsLong,ByValiAsInteger)AsBooleancapDriverConnect=SendMessage(lwnd,WM_CAP_DRIVER_CONNECT,i,0)EndFunctionFunctioncapDriverDisconnect(ByVal

40、lwndAsLong)AsBooleancapDriverDisconnect=SendMessage(lwnd,WM_CAP_DRIVER_DISCONNECT,0)EndFunctionFunctioncapDriverGetName(ByVallwndAsLong,ByValszNameAsLong,ByValwSizeAsInteger)AsBooleancapDriverGetName=SendMessage(lwnd,YOURCONSTANTMESSAGE,wSize,szName)EndFunctionFunctioncapDriverGetVersion(ByVallwndAs

41、Long,ByValszVerAsLong,ByValwSizeAsInteger)AsBooleancapDriverGetVersion=SendMessage(lwnd,WM_CAP_DRIVER_GET_VERSION,wSize,szVer)EndFunctionFunctioncapDriverGetCaps(ByVallwndAsLong,ByValsAsLong,ByValwSizeAsInteger)AsBooleancapDriverGetCaps=SendMessage(lwnd,WM_CAP_DRIVER_GET_CAPS,wSize,s)EndFunctionFunc

42、tioncapFileSetCaptureFile(ByVallwndAsLong,szNameAsString)AsBooleancapFileSetCaptureFile=SendMessageS(lwnd,WM_CAP_FILE_SET_CAPTURE_FILE,0,szName)EndFunctionFunctioncapFileGetCaptureFile(ByVallwndAsLong,ByValszNameAsLong,wSizeAsString)AsBooleancapFileGetCaptureFile=SendMessageS(lwnd,WM_CAP_FILE_SET_CA

43、PTURE_FILE,wSize,szName)EndFunctionFunctioncapFileAlloc(ByVallwndAsLong,ByValdwSizeAsLong)AsBooleancapFileAlloc=SendMessage(lwnd,WM_CAP_FILE_ALLOCATE,0,dwSize)EndFunctionFunctioncapFileSaveAs(ByVallwndAsLong,szNameAsString)AsBooleancapFileSaveAs=SendMessageS(lwnd,WM_CAP_FILE_SAVEAS,0,szName)EndFunct

44、ionFunctioncapFileSetInfoChunk(ByVallwndAsLong,ByVallpInfoChunkAsLong)AsBooleancapFileSetInfoChunk=SendMessage(lwnd,WM_CAP_FILE_SET_INFOCHUNK,0,lpInfoChunk)EndFunctionFunctioncapFileSaveDIB(ByVallwndAsLong,ByValszNameAsLong)AsBooleancapFileSaveDIB=SendMessage(lwnd,WM_CAP_FILE_SAVEDIB,0,szName)EndFun

45、ctionFunctioncapEditCopy(ByVallwndAsLong)AsBooleancapEditCopy=SendMessage(lwnd,WM_CAP_EDIT_COPY,0,0)EndFunctionFunctioncapSetAudioFormat(ByVallwndAsLong,ByValsAsLong,ByValwSizeAsInteger)AsBooleancapSetAudioFormat=SendMessage(lwnd,WM_CAP_SET_AUDIOFORMAiTe,s)EndFunctionFunctioncapGetAudioFormat(ByVall

46、wndAsLong,ByValsAsLong,ByValwSizeAsInteger)AsLongcapGetAudioFormat=SendMessage(lwnd,WM_CAP_GET_AUDIOFORMSiTe,s)EndFunctionFunctioncapGetAudioFormatSize(ByVallwndAsLong)AsLongcapGetAudioFormatSize=SendMessage(lwnd,WM_CAP_GET_AUDIOFORMAT,0)EndFunctionFunctioncapDlgVideoFormat(ByVallwndAsLong)AsBoolean

47、capDlgVideoFormat=SendMessage(lwnd,WM_CAP_DLG_VIDEOFORMAT,0,0)EndFunctionFunctioncapDlgVideoSource(ByVallwndAsLong)AsBooleancapDlgVideoSource=SendMessage(lwnd,WM_CAP_DLG_VIDEOSOURCE,0,0)EndFunctionFunctioncapDlgVideoDisplay(ByVallwndAsLong)AsBooleancapDlgVideoDisplay=SendMessage(lwnd,WM_CAP_DLG_VIDE

48、ODISPLAY,0,0)EndFunctionFunctioncapDlgVideoCompression(ByValIwndAsLong)AsBooleancapDlgVideoCompression=SendMessage(lwnd,WM_CAP_DLG_VIDEOCOMPRESSION,0,0)EndFunctionFunctioncapGetVideoFormat(ByVallwndAsLong,ByValsAsLong,ByValwSizeAsInteger)AsLongcapGetVideoFormat=SendMessage(lwnd,WM_CAP_GET_VIDEOFORwi

49、ATe,s)EndFunctionFunctioncapGetVideoFormatSize(ByVallwndAsLong)AsLongcapGetVideoFormatSize=SendMessage(lwnd,WM_CAP_GET_VIDEOFOR|AT,0)EndFunctionFunctioncapSetVideoFormat(ByVallwndAsLong,ByValsAsLong,ByValwSizeAsInteger)AsBooleancapSetVideoFormat=SendMessage(lwnd,WM_CAP_SET_VIDEOFORwAize,s)EndFunctio

50、nFunctioncapPreview(ByVallwndAsLong,ByValfAsBoolean)AsBooleancapPreview=SendMessage(lwnd,WM_CAP_SET_PREVIEW,f,0)EndFunctionFunctioncapPreviewRate(ByVallwndAsLong,ByValwMSAsInteger)AsBooleancapPreviewRate=SendMessage(lwnd,WM_CAP_SET_PREVIEWRATE,wMS,0)EndFunctionFunctioncapOverlay(ByVallwndAsLong,ByVa

51、lfAsBoolean)AsBooleancapOverlay=SendMessage(lwnd,WM_CAP_SET_OVERLAY,f,0)EndFunctionFunctioncapPreviewScale(ByVallwndAsLong,ByValfAsBoolean)AsBooleancapPreviewScale=SendMessage(lwnd,WM_CAP_SET_SCALE,f,0)EndFunctionFunctioncapGetStatus(ByVallwndAsLong,ByValsAsLong,ByValwSizeAsInteger)AsBooleancapGetSt

52、atus=SendMessage(lwnd,WM_CAP_GET_STATUS,wSize,s)EndFunctionFunctioncapSetScr011Pos(ByVallwndAsLong,ByVallpPAsLong)AsBooleancapSetScrollPos=SendMessage(lwnd,WM_CAP_SET_SCROLL,0,lpP)EndFunctionFunctioncapGrabFrame(ByVallwndAsLong)AsBooleancapGrabFrame=SendMessage(lwnd,WM_CAP_GRAB_FRAME,0,0)EndFunction

53、FunctioncapGrabFrameNoStop(ByVallwndAsLong)AsBooleancapGrabFrameNoStop=SendMessage(lwnd,WM_CAP_GRAB_FRAME_NOSTOP,0,0)EndFunctionFunctioncapCaptureSequence(ByVallwndAsLong)AsBooleancapCaptureSequence=SendMessage(lwnd,WM_CAP_SEQUENCE,0,0)EndFunctionFunctioncapCaptureSequenceNoFile(ByVallwndAsLong)AsBo

54、oleancapCaptureSequenceNoFile=SendMessage(lwnd,WM_CAP_SEQUENCE_NOFILE,0,0)EndFunctionFunctioncapCaptureStop(ByVallwndAsLong)AsBooleancapCaptureStop=SendMessage(lwnd,WM_CAP_STOP,0,0)EndFunctionFunctioncapCaptureAbort(ByVallwndAsLong)AsBooleancapCaptureAbort=SendMessage(lwnd,WM_CAP_ABORT,0,0)EndFuncti

55、onFunctioncapCaptureSingleFrameOpen(ByVallwndAsLong)AsBooleancapCaptureSingleFrameOpen=SendMessage(lwnd,WM_CAP_SINGLE_FRAME_OPEN,0,0)EndFunctionFunctioncapCaptureSingleFrameClose(ByVallwndAsLong)AsBooleancapCaptureSingleFrameClose=SendMessage(lwnd,WM_CAP_SINGLE_FRAME_CLOSE,0,0)EndFunctionFunctioncap

56、CaptureSingleFrame(ByVallwndAsLong)AsBooleancapCaptureSingleFrame=SendMessage(lwnd,WM_CAP_SINGLE_FRAME0)EndFunctionFunctioncapCaptureGetSetup(ByVallwndAsLong,ByValsAsLong,ByValwSizeAsInteger)AsBooleancapCaptureGetSetup=SendMessage(lwnd,WM_CAP_GET_SEQUENCE_SETUP,wSize,s)EndFunctionFunctioncapCaptureS

57、etSetup(ByVallwndAsLong,ByValsAsLong,ByValwSizeAsInteger)AsBooleancapCaptureSetSetup=SendMessage(lwnd,WM_CAP_SET_SEQUENCE_SETUP,wSize,s)EndFunctionFunctioncapSetMCIDeviceName(ByVallwndAsLong,ByValszNameAsLong)AsBooleancapSetMCIDeviceName=SendMessage(lwnd,WM_CAP_SET_MCI_DEVICE,0,szName)EndFunctionFun

58、ctioncapGetMCIDeviceName(ByVallwndAsLong,ByValszNameAsLong,ByValwSizeAsInteger)AsBooleancapGetMCIDeviceName=SendMessage(lwnd,WM_CAP_GET_MCI_DEVICE,wSize,szName)EndFunctionFunctioncapPaletteOpen(ByVallwndAsLong,ByValszNameAsLong)AsBooleancapPaletteOpen=SendMessage(lwnd,WM_CAP_PAL_OPEN,0,szName)EndFun

59、ctionFunctioncapPaletteSave(ByVallwndAsLong,ByValszNameAsLong)AsBooleancapPaletteSave=SendMessage(lwnd,WM_CAP_PAL_SAVE,0,szName)EndFunctionFunctioncapPalettePaste(ByVallwndAsLong)AsBooleancapPalettePaste=SendMessage(lwnd,WM_CAP_PAL_PASTE,0,0)EndFunctionFunctioncapPaletteAuto(ByVallwndAsLong,ByValiFr

60、amesAsInteger,ByValiColorAsLong)AsBooleancapPaletteAuto=SendMessage(lwnd,WM_CAP_PAL_AUTOCREATE,iFrames,iColors)EndFunctionFunctioncapPaletteManual(ByVallwndAsLong,ByValfGrabAsBoolean,ByValiColorsAsLong)AsBooleancapPaletteManual=SendMessage(lwnd,WM_CAP_PAL_MANUALCREATb,iColors)EndFunction上面是完整的模块调用方法:Dimlpsz

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论