Results 1 to 6 of 6

Thread: Non-Detectable Image On Web Browser

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2010
    Posts
    16

    Non-Detectable Image On Web Browser

    Hello,
    I have a problem on one of my programs to where it is supossed to detect a cirten image on the browser, however, the site coding seems to duplicate the image, and the program always says theres only 1 of that image, even though I can plainly see theres 4-5.

    How can I fix this?

  2. #2
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: Non-Detectable Image On Web Browser

    well, starting by posting up some code would help.

    the HTML of the actual page, the code you're using in your program, what you're trying to do with the image, etc.

    welcome.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2010
    Posts
    16

    Re: Non-Detectable Image On Web Browser

    I would post the website coding, but it's too long, so while I make a txt to attatch, Here is my Program Coding:

    Code:
    Public Class Form1
    
        Dim detectnum As Single
        Dim stopbeep As Boolean
    
        Private Sub WebBrowser2_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles Browser.DocumentCompleted
            'MsgBox("Hello World!")
            'Dim rated As HtmlElement = Me.Browser.Document.GetElementById("rating")
            'Dim wear As HtmlElement = Me.Browser.Document.GetElementById("view_in_3d")
            'rating = rated.InnerText
            'wear.InvokeMember("click")
        End Sub
    
        Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick
            Dim imageName As String
            detectnum = 0
            For Each img As HtmlElement In Me.Browser.Document.Images
                imageName = IO.Path.GetFileName(img.GetAttribute("src"))
                If imageName = My.Settings.Image.ToString Then
                    detectnum = detectnum + 1
                    If detectnum > 1 Then
                        Console.Beep()
                        If My.Settings.BringToTopIAD = True Then
                            Me.WindowState = FormWindowState.Maximized
                            Me.Focus()
                        End If
                        If My.Settings.StopIAD = True Then
                            Timer.Stop()
                            Me.StartButton.Text = "Start"
                            Me.StartButton.ForeColor = Color.Green
                        End If
                    End If
                    Exit For
                End If
            Next
            If Me.Browser.Url.ToString = "http://www.neobux.com/?u=v" Then
                Me.Browser.Refresh()
            Else
                Me.Browser.Navigate("http://www.neobux.com/?u=v")
            End If
        End Sub
    
        Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            My.Settings.Save()
            Me.Close()
        End Sub
    
        Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
            'e.Cancel = True
            'My.Settings.Save()
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            Form2.Show()
            Form2.Focus()
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartButton.Click
            If Me.StartButton.Text = "Start" Then
                Timer.Start()
                Me.StartButton.Text = "Stop"
                Me.StartButton.ForeColor = Color.Red
            Else
                Timer.Stop()
                Me.StartButton.Text = "Start"
                Me.StartButton.ForeColor = Color.Green
            End If
        End Sub
    End Class

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Sep 2010
    Posts
    16

    Re: Non-Detectable Image On Web Browser

    Here is the website code,
    For some reason they wrote it all in one line...
    Attached Files Attached Files

  5. #5

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Sep 2010
    Posts
    16

    Re: Non-Detectable Image On Web Browser

    There is a website, but the images only display if you have an account.

    http://www.neobux.com/?u=v

Posting Permissions

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



Click Here to Expand Forum to Full Width