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?
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.
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
1 Attachment(s)
Re: Non-Detectable Image On Web Browser
Here is the website code,
For some reason they wrote it all in one line...
Re: Non-Detectable Image On Web Browser
is the page online somewhere?
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