Transferir Frames captura

Iniciado por kakinets, 18 Septiembre 2005, 22:31 PM

0 Miembros y 1 Visitante están viendo este tema.

kakinets

Hola tengo una duda.....

Como ago para trasmitir los frames capturado de la webcam....

Uso este codigo..

Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias "capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hwndParent As Long, ByVal nID As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hndw As Long) As Boolean

Private Const CONNECT As Long = 1034
Private Const DISCONNECT As Long = 1035
Private Const GET_FRAME As Long = 1084
Private Const COPY As Long = 1054

Private hWndCap As Long

Private Sub START_WEBCAM_Button1_Click()
    hWndCap = capCreateCaptureWindow("WebcamCapture", 0, 0, 0, 160, 120, Me.hwnd, 0)
    DoEvents
    SendMessage hWndCap, CONNECT, 0, 0
    Timer1.Enabled = True
End Sub

Private Sub STOP_WEBCAM_Button2_Click()
    DoEvents: SendMessage hWndCap, DISCONNECT, 0, 0
    Timer1.Enabled = False
End Sub

Private Sub Timer1_Timer()
    'Obtiene frames para Picture1
    SendMessage hWndCap, GET_FRAME, 0, 0
    SendMessage hWndCap, COPY, 0, 0
    Picture1.Picture = Clipboard.GetData
    Clipboard.Clear
End Sub

Private Sub Form_Load()
    Timer1.Enabled = False
    Timer1.Interval = 1
End Sub

Private Sub Form_Unload(Cancel As Integer)
    DestroyWindow hWndCap
End Sub


PD: Se puede modificar la calidad como el brillo, color ,etc...

gracias

li3xs

A que te refieres con Transferir ? yo probe el codigo y funciona perfectamente ahora no se que es lo que quieres hacer si expliks le buscamos solucion  :xD