Help with GoSerach function

Discussion in 'Programming General' started by Renegades009, Sep 10, 2008.

Help with GoSerach function
  1. Unread #1 - Sep 10, 2008 at 9:41 PM
  2. Renegades009
    Joined:
    Feb 28, 2007
    Posts:
    274
    Referrals:
    0
    Sythe Gold:
    0

    Renegades009 Forum Addict

    Help with GoSerach function

    Hi im using this code WebBrowser1.GoSearch(TextBox3.Text) To try and search the info in a text box next to it but its giving me this error. To many arguments to public sub GoSearch(). Any Ideas?
     
  3. Unread #2 - Sep 10, 2008 at 9:56 PM
  4. Flaming Idiots
    Joined:
    Dec 22, 2005
    Posts:
    235
    Referrals:
    1
    Sythe Gold:
    0
    Two Factor Authentication User

    Flaming Idiots Active Member
    Visual Basic Programmers

    Help with GoSerach function

    GoSearch goes to the default search page. If you want to search use this:

    WebBrowser.Navigate("search " & SearchTextBox.Text)


    Also, you should use more descriptive names (ie. SearchTextBox) for your controls. Makes it much easier to code when your forms have a lot of controls.
     
  5. Unread #3 - Sep 10, 2008 at 10:24 PM
  6. Renegades009
    Joined:
    Feb 28, 2007
    Posts:
    274
    Referrals:
    0
    Sythe Gold:
    0

    Renegades009 Forum Addict

    Help with GoSerach function

    Dude thanks you very much as you see im a noob. No theres one other promblem it compiles but when i try and search it brings up page cannot be displayed any ideas?
     
  7. Unread #4 - Sep 11, 2008 at 10:55 PM
  8. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    Help with GoSerach function

    You should actually be using something like this for example to search Google...

    Example Code to search using the textbox
    Code:
    WebBrowser.Navigate("http://www.google.ca/search?hl=en&q=" & SearchTextBox.Text)
    Example of multi-term search URL where it's searching for "Hello" and "Hi"
    Code:
    http://www.google.ca/search?hl=en&q=Hello+Hi
    You'll have to make it replace the spaces in your Textbox string with +'s for it to search multiple terms. Hope this was understandable, it's quite easy to do it for most other search engines too.
     
  9. Unread #5 - Sep 13, 2008 at 1:01 AM
  10. Renegades009
    Joined:
    Feb 28, 2007
    Posts:
    274
    Referrals:
    0
    Sythe Gold:
    0

    Renegades009 Forum Addict

    Help with GoSerach function

    Hey nullware i was thinking of something like that. But ive moved on to other projects but thanks anyway.
     
< Drag Effect? | Htaed auto clicker. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site