Programación de cámara web VB.NET ¡Ayuda, Dios te ayude! Aquí está el código que probé antes en VB6: coloque un botón llamado Command1 y un PictureBox llamado Picture1 en el formulario.
Función de declaración privada 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 Const privada WS_CHILD = amp H400 Constante privada WM_CAP_EDIT_COPY = (WM_CAP_START 30) Constante privada WM_CAP_DRIVER_CONNECT = (WM_CAP_START 10) Constante privada WM_CAP_SET_PREVIEWRATE = (WM_CAP_START 5 2 ) Privado Const WM_CAP_SET_OVERLAY = (WM_CAP_START 51) Const privado WM_CAP_SET_OVERLAY = (WM_CAP_START 51) Const privado WM_CAP_START = (WM_CAP_START 52) START 51) Const privado WM_CAP_SET_PREVIEW = (WM_CAP_START 50) Const privado WM_CAP_DRIVER_DISCONNECT = (WM _CAP_START 11) Función de declaración privada SendMessage Lib "user32 " _ Alias "SendMessageA" ( _ ByVal hWnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, _ lParam As Any) As Long Función de declaración privada SendMessageAsLong Lib "user32" _ Alias "SendMessageA" _ (ByVal hWnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, Private Preview_Preview_AsLong Long) As Long Private Preview_Handle As Long Private iDevice As Long Private hHwnd As Long Private Sub Command1_Click() Dim bRet As Boolean Dim szTest As String szTest = App .Path amp; "\TEST.bmp" amp; Chr$(0) bRet = capEditCopy(hHwnd) Si bRet Entonces DoEvents Si Clipboard.GetFormat(vbCFBitmap) Luego Imagen1.