Código
Private Const DISCONNECT As Long = 1035 Private Const GET_FRAME As Long = 1084 Private Const WM_USER = &H400 Private Const WM_CAP_START = WM_USER Private Const WM_CAP_FILE_SAVEDIB = WM_CAP_START + 25 Private Const WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10 Private Const WM_CAP_DLG_VIDEOSOURCE = WM_CAP_START + 42 ... Dim hWndCap as long Dim RutaTMP as string RutaTMP=StrConv("c:\foto.bmp",vbFromUnicode) hWndCap = capCreateCaptureWindow("WebcamCapture", 0, 0, 0, 160, 120, Me.hwnd, 0) if hWndCap <> 0 then SendMessage hWndCap, WM_CAP_DRIVER_CONNECT, 0, 0 SendMessage hWndCap, GET_FRAME, 0, 0 SendMessage hWndCap, DISCONNECT, 0, 0 SendMessage hWndCap, WM_CAP_FILE_SAVEDIB, 0, byval StrPtr(RutaTMP) DestroyWindow hWndCap ' // Aqui se mandaria la foto... end if
Temibles Lunas!¡.
.