VFP调用API来控制USB摄像头,实现拍照或录像
*--前提:VFP7.0以上;Windows 2K及以上 *--控件:AVICAP32.DLL *--定义:一般放到主程序或表单(集)的Load事件中 Public WM_CAP_DRIVER_DISCONNECT Public hwndc,WM_CAP_SAVEDIB,WM_CAP_FILE_SET_CAPTURE_FILEA,WM_CAP_SEQUENCE,WM_CAP_STOP Declare Integer capCreateCaptureWindowA In "AVICAP32.DLL" String lpszWindowName ,Integer dwStyle ,; Integer x, Integer Y, Integer nWidth ,Integer nHeight,Integer ParentWin,Integer nId Declare Integer SendMessage In "user32" Integer HWnd, Integer wmsg,Integer wpar1, Integer wpar2 Declare Integer SendMessage In "user32" As SendMessageA Integer HWnd, Integer wmsg,Integer wpar1, String wpar2 *--显示:可以放到按钮或表单