vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
sevAniGif - als kostenlose Vollversion auf unserer vb@rchiv CD Vol.5  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
Re: WebCam Klasse Teil 1 
Autor: icetea123
Datum: 28.05.08 15:33

Habs doch früher geschafft:
Imports System.Runtime.InteropServices
 
Public Class WebCamCapture
    Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias _
      "capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal dwStyle _
      As Int32, ByVal x As Int32, ByVal y As Int32, ByVal nWidth As Int32, _
      ByVal nHeight As Int32, ByVal hWndParent As Int32, ByVal nID As Int32) As _
      Int32
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _
    ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal _
    lParam As Int32) As Int32
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _
    ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByRef _
    lParam As CAPSTATUS) As Int32
    Private Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As _
    Int32, ByVal hWndInsertAfter As Int32, ByVal x As Int32, ByVal y As Int32, _
    ByVal cx As Int32, ByVal cy As Int32, ByVal wFlags As Int32) As Int32
    Private Declare Function DestroyWindow Lib "user32.dll" (ByVal hwnd As _
    Int32) As Int32
    Private Declare Function capGetDriverDescription Lib "avicap32.dll" Alias _
    "capGetDriverDescriptionA" (ByVal wDriverIndex As Int32, ByVal lpszName As _
    String, ByVal cbName As Int32, ByVal lpszVer As String, ByVal cbVer As _
    Int32) As Int32
 
    Private Const WS_VISIBLE As Int32 = &H10000000
    Private Const WS_CHILD As Int32 = &H40000000
    Private Const WM_CAP_SET_PREVIEWRATE As Int32 = (WM_CAP_START + 52)
    Private Const HWND_BOTTOM As Int32 = 1
    Private Const SWP_NOMOVE As Int32 = &H2
    Private Const SWP_NOZORDER As Int32 = &H4
 
    Private Const WM_CAP_GET_STATUS As Int32 = (WM_CAP_START + 54)
 
    Private Const WM_CAP_FILE_GET_CAPTURE_FILEA As Int32 = (WM_CAP_START + 21)
    Private Const WM_CAP_FILE_SET_CAPTURE_FILEA As Int32 = (WM_CAP_START + 20)
 
    Private Const WM_CAP_SEQUENCE As Int32 = (WM_CAP_START + 62)
    Private Const WM_CAP_FILE_SAVEASA As Int32 = (WM_CAP_START + 23)
 
    Private Const WM_USER As Int32 = &H400
    Private Const WM_CAP_START As Int32 = WM_USER
    Private Const WM_CAP_DRIVER_CONNECT As Int32 = (WM_CAP_START + 10)
    Private Const WM_CAP_SET_SCALE As Int32 = (WM_CAP_START + 53)
    Private Const WM_CAP_SET_PREVIEW As Int32 = (WM_CAP_START + 50)
    Private Const WM_CAP_DRIVER_DISCONNECT As Int32 = (WM_CAP_START + 11)
    Private Const WM_CAP_GRAB_FRAME As Int32 = (WM_CAP_START + 60)
    Private Const WM_CAP_EDIT_COPY As Int32 = (WM_CAP_START + 30)
 
    <System.Runtime.InteropServices.StructLayout( _
      Runtime.InteropServices.LayoutKind.Sequential)> _
    Public Structure Point
        Public x As UInt32
        Public y As UInt32
    End Structure
 
    <System.Runtime.InteropServices.StructLayout( _
      Runtime.InteropServices.LayoutKind.Sequential)> _
    Public Structure CAPSTATUS
        Dim uiImageWidth As UInt32
        Dim uiImageHeight As UInt32
        Dim fLiveWindow As Boolean
        Dim fOverlayWindow As Boolean
        Dim fScale As Boolean
        Dim ptScroll As Point
        Dim fUsingDefaultPalette As Boolean
        Dim fAudioHardware As Boolean
        Dim fCapFileExists As Boolean
        Dim dwCurrentVideoFrame As UInt32
        Dim dwCurrentVideoFramesDropped As UInt32
        Dim dwCurrentWaveSamples As UInt32
        Dim dwCurrentTimeElapsedMS As UInt32
        Dim hPalCurrent As IntPtr
        Dim fCapturingNow As Boolean
        Dim dwReturn As UInt32
        Dim wNumVideoAllocated As UInt32
        Dim wNumAudioAllocated As UInt32
    End Structure
 
    Private capwnd As Integer
    Private active As Boolean = False
    Private wndname As String
    Private capparent As Control
    Private _capfile As String
    Private _filecapactive As Boolean
 
    Public Sub New(ByVal capwndname As String)
        wndname = capwndname
    End Sub
 
    Public Class CapDevice
        Public Name As String
        Public Version As String
        Public iDeviceIdx As Integer
 
        Public Overrides Function ToString() As String
            Return Name
        End Function
    End Class

-----------------------------------
Betriebssystem: Schrott (Vista)
Entwicklungsumgebung: VS 2008

alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Webcam Video auf Form Anzeigen3.512Tredory27.05.08 22:28
Re: Webcam Video auf Form Anzeigen2.926Christian2528.05.08 00:17
Re: Webcam Video auf Form Anzeigen2.786icetea12328.05.08 07:38
Re: WebCam Klasse Teil 13.202icetea12328.05.08 15:33
Re: Webcam Klasse Teil 22.847icetea12328.05.08 15:34
Re: Webcam Klasse Teil 33.048icetea12328.05.08 15:35
Re: Webcam Klasse Teil 32.734Tredory28.05.08 17:16
Re: Webcam Klasse Teil 32.812Tredory28.05.08 17:53
Re: Webcam Klasse Teil 32.745Tredory28.05.08 18:15
Re: Webcam Klasse Teil 32.706icetea12328.05.08 18:53
Re: Webcam Klasse Teil 32.773Tredory28.05.08 19:53
Re: Webcam Klasse Teil 32.796Tredory28.05.08 21:31
Re: Webcam Klasse Teil 32.801icetea12329.05.08 14:50
Re: Webcam Klasse Teil 32.880Tredory29.05.08 20:43
Re: Webcam Klasse Teil 32.849icetea12330.05.08 14:50
Re: Webcam Klasse Teil 32.759Tredory30.05.08 16:51
Re: Webcam Video auf Form Anzeigen2.867Kyratim28.05.08 19:16
Re: Webcam Video auf Form Anzeigen2.773icetea12328.05.08 20:21

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel