★ 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
[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?
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:
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":
And now copy the URL after the "lol":
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:
Have Fun!
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
Mine is in portuguese because I've used google.pt to make the search!http://www.google.pt/search?hl=pt-PT&source=hp&q=lol&btnG=Pesquisa+do+Google&meta=&aq=&oq=lo
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
paste it in a notepad or something, just remember it.http://www.google.pt/search?hl=pt-PT&source=hp&q=
And now copy the URL after the "lol":
Code: Select all
and as the last url part, remember it!&btnG=Pesquisa+do+Google&meta=&aq=&oq=lo
- 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
Well Done, you've just created a google searcher!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")
Have Fun!
Actually you don't need the last part all you need is:
Code: Select all
All of the extra stuff at the end isn't needed. Webbrowser1.navigate ("http://www.google.com/search?q=" & textbox1.text)
Really? I thought it was an importante piece of the URL.
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""
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
it seems that every1 whodoes vb has to try 2 make a web browser :P
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023