★ VB.NET For Morons | Google Toolbar Tutorial ★

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
7 posts Page 1 of 1
Contributors
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

[center]★ Google Toolbar Tutorial ★
by Nery[/center]


Okay, ever wanted to add to your webbrowser a falsified "Google Toolbar" that allows the user to simply type the type of search he wants and press a button and it automatically makes a Google search into your webbrowser?

  • Getting the Link


Ok, in order to do a google searcher: Open up your webbrowser, navigate to Google's search page, make a search of anything, for example I've made a search of the word "lol", after getting the search accomplished check out the URL; You may have something similar to this:
Code: Select all
http://www.google.pt/search?hl=pt-PT&source=hp&q=lol&btnG=Pesquisa+do+Google&meta=&aq=&oq=lo
Mine is in portuguese because I've used google.pt to make the search!

If you look closely into my link you can see the word "lol", exactly what I searched for!

This "lol" is a separator, copy all the URL you see before the "lol":
Code: Select all
http://www.google.pt/search?hl=pt-PT&source=hp&q=
paste it in a notepad or something, just remember it.

And now copy the URL after the "lol":
Code: Select all
&btnG=Pesquisa+do+Google&meta=&aq=&oq=lo
and as the last url part, remember it!

  • Coding it!


Open up your Visual Basic.NET and add 1 button and 1 textbox to your form, leave the textbox with his default name, double tap the button you've just created and you may enter in the Code tab, once there type the following:
Code: Select all
WebBrowser1.Navigate("http://www.google.pt/search?hl=pt-PT&source=hp&q=" & TextBox1.Text & "&btnG=Pesquisa+do+Google&meta=&aq=&oq=lo")

Simplified:

YourWebbrowserControlName.Navigate("YourFirstPartofTheURL" & YourTextBoxControlName.Text & "YourSecondPartOfTheURL")
Well Done, you've just created a google searcher!

Have Fun!
User avatar
bjm0008
Dedicated Member
Dedicated Member
Posts: 69
Joined: Thu Aug 13, 2009 2:35 am

Actually you don't need the last part all you need is:
Code: Select all
 Webbrowser1.navigate ("http://www.google.com/search?q=" & textbox1.text)
All of the extra stuff at the end isn't needed.
Image
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

Really? I thought it was an importante piece of the URL.
User avatar
bjm0008
Dedicated Member
Dedicated Member
Posts: 69
Joined: Thu Aug 13, 2009 2:35 am

Try to google search something with both of the URL's, they come out the same. You could have it either way, but when you use the it your way you get "Tip: Save time by hitting the return key instead of clicking on "search""
Image
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

Alright. Then I'll keep it my way :D
User avatar
Normall
Member
Member
Posts: 49
Joined: Wed Nov 25, 2009 9:25 pm

Very Cool
User avatar
Miutubevids
VIP-Member
VIP-Member
Posts: 293
Joined: Mon Nov 23, 2009 11:39 am

nice1 i did this ages ago for my web browser
it seems that every1 whodoes vb has to try 2 make a web browser :P
Don't BS the BSer

RePlay V1.0 - Record your Mouse Clicks, Mouse Movments and Keystrokes
AutoClicker v1.0
SnowScreen
Reaction Timer Game V1.0
7 posts Page 1 of 1
Return to “Tutorials”