dcsimg
Results 1 to 3 of 3

Thread: Re: Live visual basic chat rooms?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2014
    Posts
    1

    Re: Live visual basic chat rooms?

    hi can anyone help me solve this problem?


    Imports AForge.Video.DirectShow
    Imports BarcodeLib.BarcodeReader

    Public Class Form1
    Private Devices As FilterInfoCollection
    Private VideoSource As VideoCaptureDevice

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'ADD REFERENCES
    'ADD CONTROL
    'DESIGN FORM
    VideoSource = New FilterInfoCollection(FilterCategory.VideoInputDevice)
    For Each x As FilterInfo In Devices
    ComboBox1.Items.Add(x.Name)
    Next
    ComboBox1.SelectedIndex = 0
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    'BEGIN VIDEO
    Timer1.Enabled = True

    VideoSource = New VideoCaptureDevice(Devices(ComboBox1.SelectedIndex).MonikerString)
    VideoSource = VideoSource
    VideoSource.Start()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    'STOP VIDEO
    Timer1.Enabled = False
    VideoSource.SignalToStop()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    'MAKE SURE THAT THERES AN IMAGE ON THE WEBCAM
    If VideoSource.GetCurrentVideoFrame() IsNot Nothing Then
    'GET IMAGE FROM THE WEBCAM
    Dim img As New Bitmap(VideoSource.GetCurrentVideoFrame())
    'USE THE LIBRARY AND READ THE CODE
    Dim results As String() = BarcodeReader.read(img, BarcodeReader.QRCODE)
    'REMOVE IMAGE FROM MEMORY
    img.Dispose()
    'GET VIDEOS WHEN SOMETHING IS READABLE)
    If results IsNot Nothing AndAlso results.Count() > 0 Then
    'ADD RESULTS IN THE LIST
    'GET VERIFICATION CODE AND REMOVE TEXT
    If results(0).IndexOf("1111") <> -1 Then
    'REMOVE CODE FROM THE TEXT
    results(0) = results(0).Replace("1111", "")
    ListBox1.Items.Insert(0, results(0))
    End If

    End If
    End If
    End Sub
    End Class



    Error 1 Value of type 'AForge.Video.DirectShow.FilterInfoCollection' cannot be converted to 'AForge.Video.DirectShow.VideoCaptureDevice'. C:\Users\Roger\Desktop\Projects\QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)\QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)\Form1.vb 12 23 QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)

    Error 2 'GetCurrentVideoFrame' is not a member of 'AForge.Video.DirectShow.VideoCaptureDevice'. C:\Users\Roger\Desktop\Projects\QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)\QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)\Form1.vb 36 12 QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)


    Error 3 'GetCurrentVideoFrame' is not a member of 'AForge.Video.DirectShow.VideoCaptureDevice'. C:\Users\Roger\Desktop\Projects\QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)\QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)\Form1.vb 38 35 QR Code Reader Goal -Line TEchnology (Rogerio Pinto, 0909995)



    Microsoft Visual Basic Express Edition

    note : the line with a smiley face are the one where the problem is

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,569

    Re: Live visual basic chat rooms?

    Moved from General Development to Vb.Net forums.

    @Roger007 - please do not resurrect old threads.

  3. #3
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,335

    Re: Live visual basic chat rooms?

    Why should we waste are time when you can not be bothered to spend a few minutes explaining your issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width