Help with Searchbar

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
12 posts Page 1 of 2
Contributors
User avatar
master3395
New Member
New Member
Posts: 14
Joined: Wed May 08, 2013 8:17 pm

Help with Searchbar
master3395
Hello, i have made a program, with a Webbrowser inside a TabControl
And i have some problems with the search bar.
It only takes me to the search domain, not searching for the line.

There is 4 pictures, i was only allowed to upload 3

Searchbar4.png V
https://dl.dropboxusercontent.com/u/268 ... chbar4.png
You do not have the required permissions to view the files attached to this post.
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Help with Searchbar
Filip
try with webbrowser1.navigate("http://...?=" & TextBox1.Text)
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
master3395
New Member
New Member
Posts: 14
Joined: Wed May 08, 2013 8:17 pm

Re: Help with Searchbar
master3395
Filip wrote:
try with webbrowser1.navigate("http://...?=" & TextBox1.Text)
I get to the site, but it won't search, and the links is probably wrong :/
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Help with Searchbar
Filip
Probably
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
smashapps
Coding Guru
Coding Guru
Posts: 961
Joined: Tue Apr 05, 2011 8:41 am

Re: Help with Searchbar
smashapps
I know that the google link is correct I typed in my browser what you had typed in.

It might be easier if I can see what is happening. Did you want me to go on Teamviewer and help you out?
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
User avatar
master3395
New Member
New Member
Posts: 14
Joined: Wed May 08, 2013 8:17 pm

Re: Help with Searchbar
master3395
smashapps wrote:
I know that the google link is correct I typed in my browser what you had typed in.

It might be easier if I can see what is happening. Did you want me to go on Teamviewer and help you out?
Nothing is happening, when i type something in the search Textbox, and click search, it only goes to google on my browser, it does not search for what i typed
User avatar
smashapps
Coding Guru
Coding Guru
Posts: 961
Joined: Tue Apr 05, 2011 8:41 am

Re: Help with Searchbar
smashapps
Try & TextBox1.Text
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
User avatar
master3395
New Member
New Member
Posts: 14
Joined: Wed May 08, 2013 8:17 pm

Re: Help with Searchbar
master3395
smashapps wrote:
Try & TextBox1.Text
It didn't work, it only takes me to google, it does not search anything, only provides you to the host.

Code: Select all
    Private Sub Search_Click(sender As Object, e As EventArgs) Handles Search.Click
        If My.Settings.Search = 1 Then
            WebBrowser1.Navigate("http://www.google.com/#sclient=psy&hl=en&site=&source=hp&q=" & TextBox1.Text)
        End If
        If My.Settings.Search = 2 Then
            WebBrowser1.Navigate("http://www.youtube.com/results?search_query=" & TextBox1.Text)
        End If
        If My.Settings.Search = 3 Then
            WebBrowser1.Navigate("http://www.bing.com/search?q=" & TextBox1.Text)
        End If
        If My.Settings.Search = 4 Then
            WebBrowser1.Navigate("http://www.search.yahoo.com/results?search_query=" & TextBox1.Text)
        End If
    End Sub
User avatar
smashapps
Coding Guru
Coding Guru
Posts: 961
Joined: Tue Apr 05, 2011 8:41 am

Re: Help with Searchbar
smashapps
I've got it working on my end.
Change your Search setting to an integer since it isn't a string and change your search's click event to this:
Code: Select all
Private Sub Search_Click(sender As Object, e As EventArgs) Handles Search.Click

        If My.Settings.Search = 1 Then
            WebBrowser1.Navigate("http://www.google.com/#sclient=psy&hl=en&site=&source=hp&q=" & TextBox1.Text)
        ElseIf My.Settings.Search = 2 Then
            WebBrowser1.Navigate("http://www.youtube.com/results?search_query=" & Textbox1.Text)
        ElseIf My.Settings.Search = 3 Then
            WebBrowser1.Navigate("http://www.bing.com/search?q=" & Textbox1.Text)
        ElseIf My.Settings.Search = 4 Then
            WebBrowser1.Navigate("http://www.search.yahoo.com/results?search_query=" & Textbox1.Text)
            End If
    End Sub
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Re: Help with Searchbar
CodenStuff
The code works fine. Are you sure TextBox1 is the correct control for the search input?.

Try change the google code to this and see if it searches:
Code: Select all
WebBrowser1.Navigate("http://www.google.com/#sclient=psy&hl=en&site=&source=hp&q=codenstuff")
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
12 posts Page 1 of 2
Return to “Tutorial Requests”