>>method initvideodevices >>LOCAL lnCount,lnx >>lnCount=thisform.oleVideo.Video_capturedevices_getcount() >> >>** Zero Based >>IF lnCount>=1 >> FOR lnX=1 TO lnCount >> lcName=thisform.oleVideo.video_capturedevices_getitem(lnX-1) >> thisform.cboDevices.AddItem(lcName,lnX) >> ENDFOR >> IF EMPTY(thisform.cboDevices.value) >> thisform.cboDevices.Value=thisform.oleVideo.video_capturedevices_getitem(lnCount-1) >> ENDIF >> IF !EMPTY(thisform.cboDevices.Value) >> thisform.initvideo() >> ENDIF >>ELSE >> MESSAGEBOX("No video devices found.",0+64+0,_screen.cApplicationName) >>ENDIF >> >>method initvideo >>TRY >> thisform.oleVideo.setserial("your-serial") >> thisform.oleVideo.video_CaptureDevice=thisform.cboDevices.Value >> thisform.oleVideo.audio_playAudio=.F. >> thisform.oleVideo.deinterlace_use=.F. >> thisform.oleVideo.video_useeffects=.F. >> thisform.oleVideo.video_framerate=10 >> thisform.oleVideo.outputformat= 9 && Format_DirectStream_DV 10 && Format_DirectStream_MPEG >> *thisform.oleVideo.video_codec="MJPEG Compressor" >> *thisform.oleVideo.video_use_Compression=.F. >> >> thisform.oleVideo.network_streaming_enabled=.F. >> thisform.oleVideo.audio_captureformat_useBest=.F. &&.T. >> thisform.oleVideo.video_captureformat_usebest=.T. &&.T. >> thisform.oleVideo.video_renderer= 1 && VR_VMR9 >> thisform.oleVideo.screen_stretch=.F. >> thisform.oleVideo.video_renderer_deinterlace_UseDefault= .T. >> thisform.oleVideo.video_resizeorcrop_Enabled=.F. >> >> thisform.oleVideo.start() >> >>CATCH TO oErr >> MESSAGEBOX("Error: "+oErr.message,0+64+0,_screen.cApplicationName) >>ENDTRY >> >> >>method getpicture >>LPARAMETERS lcFileNameWithPath,lnImageQuality >>thisform.oleVideo.frame_Grabber_Enabled=.T. >>thisform.oleVideo.frame_GetCurrent() >>thisform.oleVideo.frame_SaveToJPEGFile(lcFileNameWithPath,lnImageQuality) >>