首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > VFP >

各位,问一下有什么好的照片采集软件和vfp的报名表相连的可以同时一边报名,一边采集照片,照片名字可以用表里的建档号

2012-02-28 
各位大虾,问一下有什么好的照片采集软件和vfp的报名表相连的可以同时一边报名,一边采集照片,照片名字可以

各位大虾,问一下有什么好的照片采集软件和vfp的报名表相连的可以同时一边报名,一边采集照片,照片名字可以用表里的建档号
各位大虾,问一下有什么好的照片采集软件和vfp的报名表相连的可以同时一边报名,一边采集照片,照片名字可以用表里的建档号,或者有什么代码???可以实现???

[解决办法]
定义:

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


显示:

WM_USER = 1024
WM_CAP_START = WM_USER
WM_CAP_STOP = WM_CAP_START + 68
WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10

WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11
WM_CAP_SAVEDIB = WM_CAP_START + 25
WM_CAP_GRAB_FRAME = WM_CAP_START + 60
WM_CAP_SEQUENCE = WM_CAP_START + 62
WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20
WM_CAP_SEQUENCE_NOFILE =WM_CAP_START+ 63
WM_CAP_SET_OVERLAY =WM_CAP_START+ 51
WM_CAP_SET_PREVIEW =WM_CAP_START+ 50
WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START +6
WM_CAP_SET_CALLBACK_ERROR=WM_CAP_START +2
WM_CAP_SET_CALLBACK_STATUSA= WM_CAP_START +3
WM_CAP_SET_CALLBACK_FRAME= WM_CAP_START +5
WM_CAP_SET_SCALE=WM_CAP_START+ 53
WM_CAP_SET_PREVIEWRATE=WM_CAP_START+ 52

hWndC = capCreateCaptureWindowA( 'My Own Capture Window ',1342177280,0,0,320,240,THISFORM.HWND ,0)
IFhWndC <> 0
SendMessage(hWndC, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0)
SendMessage(hWndC, WM_CAP_SET_CALLBACK_ERROR, 0, 0)
SendMessage(hWndC, WM_CAP_SET_CALLBACK_STATUSA, 0, 0)
SendMessage(hWndC, WM_CAP_DRIVER_CONNECT, 0, 0)
SendMessage(hWndC, WM_CAP_SET_SCALE, 1, 0)
SendMessage(hWndC, WM_CAP_SET_PREVIEWRATE, 66, 0)
SendMessage(hWndC, WM_CAP_SET_OVERLAY, 1, 0)
SendMessage(hWndC, WM_CAP_SET_PREVIEW, 1, 0)
*THISFORM.ACTIVATE
ENDIF


关闭:

SendMessage(hWndC,WM_CAP_DRIVER_DISCONNECT, 0, 0)
hWndC=0


保存图像:

ss=GETFILE( "bmp;Jpg ")
IF !EMPTY(ss)
SendMessageA(hWndC,WM_CAP_SAVEDIB,0,SS)
ENDIF


开始录像:

ss = GETFILE( "avi ")
IF !EMPTY(ss)
SendMessageA(hWndC,WM_CAP_FILE_SET_CAPTURE_FILEA,0,ss)
SendMessageA(hWndC, WM_CAP_SEQUENCE, 0, 0)
THIS.ENABLED=.F.
THISFORM.MOUSEPOINTER= 0
THISFORM.command5.ENABLED=.T.
ENDIF


停止录像:
SendMessage(hWndC, WM_CAP_STOP, 0, 0)
THISFORM.command4.ENABLED=.T.
THIS.ENABLED=.F.


[解决办法]
显示大小通过这句更改

hWndC = capCreateCaptureWindowA( 'My Own Capture Window ',1342177280,0,0,320,240,THISFORM.HWND ,0)

但生成的文件是由摄像头本身默认的不能改。

热点排行