
-----------------------------------
camilito
Wed Mar 30, 2005 8:48 am

help on a program that opens google and makes a search
-----------------------------------
im trying to code something that will open a google page for example and fill in automatically a search criteria that the user inputs into a textbox in my program....

could somebody help? 8)

-----------------------------------
Tony
Wed Mar 30, 2005 11:16 am


-----------------------------------
.Net (you're interested in the latter)

-----------------------------------
camilito
Thu Mar 31, 2005 9:18 pm

ok well..
-----------------------------------
a google page was just an example ... how about a yahoo search ..or maybe a game site search... or something like that ..

-----------------------------------
GlobeTrotter
Thu Mar 31, 2005 9:45 pm


-----------------------------------
You could always just analyze the website adresses resulting from a search, and open a window to that.  For example: in google, open a website to "http://www.google.ca/search?hl=en&q=(SEARCH ITEM HERE)&meta="

-----------------------------------
camilito
Fri Apr 01, 2005 9:55 am

ummm..
-----------------------------------
how would u code that in vb?....
is there anyway to open a webpage from vb?

-----------------------------------
betaflye
Wed Apr 20, 2005 6:14 pm


-----------------------------------
Declare the following API call at the top of your source code.

Private Declare Function ShellExecute Lib _
              "shell32.dll" Alias "ShellExecuteA" _
              (ByVal hwnd As Long, _
               ByVal lpOperation As String, _
               ByVal lpFile As String, _
               ByVal lpParameters As String, _
               ByVal lpDirectory As String, _
               ByVal nShowCmd As Long) As Long

Ok then to open the webpage use the following function call


Call ShellExecute(0&, "open", "www.compsci.ca, "", "", SW_SHOW)

This will open the webpage in the default browser, as to how to make a search, you'll need to figure that out with the URL of the search engine :)

-----------------------------------
diqua
Wed Apr 20, 2005 8:08 pm


-----------------------------------
you would have to get the web control in your tool bar then you can put webpages right into your form.
right click on the controls area to see a menu
