Problem with WebBrowser and Source code

Status
Not open for further replies.
4hzhqg.jpg

DONT'T you see it is a C# not VB, i told you to translate it to VB(i am not doing this for you).
 
This dude is so funny I gave him the answer straight on how to get DOM elements using webbrowser all he had to do is put that on google and he would find several tutorials and guides aswell as the msdn documentation but he kicks in again asking for a ready to go code :( makes me wanna quit helping people.
 
Code:
 Private Sub ElectricButton2_Click(sender As Object, e As EventArgs) Handles ElectricButton2.Click        WebBrowser1.Navigate("https://www.blurum.it/Web/")
        Dim searchBox As HtmlElement = Nothing
        Dim searchButton As HtmlElement = Nothing
        searchBox = WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search_bar_input")
        searchButton = WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search")
        Do While WebBrowser1.Document Is Nothing OrElse searchBox Is Nothing OrElse searchButton Is Nothing
            Application.DoEvents()
            searchBox = WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search_bar_input")
            searchButton = WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search")
        Loop
        Dim keyword As String = ListBox1.SelectedItem
        WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search_bar_input").InnerText = (keyword)
        searchBox.SetAttribute("value", keyword)
        searchButton.InvokeMember("click")
        WebBrowser1.Refresh()
        For i As Integer = ListBox1.SelectedItems.Count - 1 To 0 Step -1
            Dim k As Integer = ListBox1.SelectedIndices(i)
            ListBox1.Items.RemoveAt(k)
        Next
        Timer1.Enabled = True
    End Sub

This code work, but in this image:
la3bl.jpg

when i click for example "lil wayne", doesn't appaer in the textbox of WebBrowser, but only search it.. And the points doesn't increase
 
why not load the source into a string - or textbox since you like them so much - and then just parse out the name of the form items you want to submit.

it is the long way around but it works for me

you could always just pay someone to code it for you, since that is what you want to happen anyway
 
Damnd..I only want the last help
 
please someone can help me..?
 
No offense, but you are one of the laziest people i have ever seen.
3 days since you posted the thread - you could solve the problem on your own instead of relying on others.
I took some of my time to write the shitty code you are using and not a single thanks ? I know where the problem is, but guess what, i can be a douche too. Have a nice day.
 
Last edited:
No offense, but you are one of the laziest people i have ever seen.
3 days since you posted the thread - you could solve the problem on your own instead of relying on others.
I took some of my time to write the shitty code you are using and not a single thanks ? I know where the problem is, but guess what, i can be a douche too. Have a nice day.

LOL i'm italian
 
what does being italian have to do with doing your own work?
You PM me and ask me to help then link me to the thread.

Like others have said, all the work you do asking for help you could put that energy into learning BASIC. It is the easiest language to learn.

Give a man a fish...
 
Damd only an help I want, anything else
 
Enough of this begging already. People here have provided you with enough help, if you can't be bothered moving your ass, go beg somewhere else.

Btw, the word "douche" theMagicNumber mentioned is not a nationality :D

Thread locked.
 
Status
Not open for further replies.
Back
Top