google search textbox1

I'm trying to make a program that will start after boot (in windows).

I want to be able to type a phrase or whatever and it will navigate to google.com then (and here is where I can't figure it out) search the phrase/string in the google's search box.

I don't have much, but here it is:

1
2
3
4
5
6
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
			 {
				 webBrowser1->Navigate("http://google.com");
				 //textBox1->Text = "cplusplus.com"
				 //How do I get the search bar at Google to = textBox1?
			 }
Well, you can either get the HTML document, find the search text box and enter the text, and then find the submit button and click it.

Or you could use a search url.

Or use http://lmgtfy.com/ instead of googling directly, e.g.

http://lmgtfy.com/?q=google+search+url

Andy

P.S. Are you talking to a running instance of IE, or are you using the WebBrowser control in your own app?
Last edited on
I'm use a webBrowser in my app. I it's just a form with a docked webBrowser1 and nothing else. the default URL is google. and when google comes up I want to be able to google a phrase from form1.. in text that would look like this (sorry no pic/vid illustration because I can't figure it out)



//User enters a search sting in Form1->textBox1
//User clicks "Search" button in Form1->button1
//Form 2 opens
//Form 2 goes to default (google.com)
//After page loads Form2->webBrowser1 reads string of From1->textBox1
//Then the search bar of google in Form2->webBroswer1 searches for the string


Sorry if that doesn't make sense, I honestly don't know a better way to illistrate what I am trying to do...
If the user has entered the search string, you could use that to create a search URL and then use that when you call Navigate.

Unless you want to "animate" the performing of the Google search?
Topic archived. No new replies allowed.