I have figured out how to open webpages, but, if on the button click you open a webpage, say www.google.com. But, if you have a textbot on the program, and on the button click you want www.google.com/i-typed-this-in-the-textbot, how would you go about coding that Thanks

Little Help
Bennie9425
System.Diagnostics.Process.Start(
"C:\\Program Files\\Internet Explorer\\iexplore.exe",
INPUT = INPUT + textBox1.Text);
Internet explorer launches, but if i have anyhting with 2 words in it, such as C++ tutorial, it will only search for C++, and exclude the second word
And the URL is http://thottbot.com/ s=, the site searches for what is after the =, the site itself adds the %20 if you put 2 seperate words after the =, but the program does not do it correctly.
greenie
Dietz
it should be as I suggested earlier:
System.Diagnostics.Process.Start("http://www.thottbot.com/ s=" + this.textbox1.Text);
does this work for you now
robdken
when you press the button, what happens the IE Window launches with the url correct, to navigate to that page what is the url to that page copy and paste the url/link here.
would be ideal if you can also post your entire code here, as is
Weste
not sure I quite follow your requirement. are you able to explain it a bit clearer If you launched a webpage/site already, you would need to relaunch it containing the new url, I don't believe there is a way to just append the url together when an instance of IE has been opened already for example
Transco901
this would be to do with your form perhaps. Make sure that the Cursor property is set to Default on your form properties (designer view, select the form then look at the properties Window)
Does this happen all the time (constantly throughout the application lifespan/time)
doublejay
Aaron Leiby
usually when the button is on focus and you press enter, it presses the button. Perhaps you implemented a keypress event somewhere causing it to override the default behavior
if you are saying that you wish that when the user presses the enter key IN the textbox and you wish to press that button, do the following:
select the textbox on designer view.
click on events (lightning symbol)
double click on "KeyDown" event to generate a keydown event for that textbox.
then do:
if (this.theTextBox.Length > 0)
{
if (e.KeyCode == Keys.Enter)
{
this.theButton.PerformClick();
}
}
does this help
svxtc
Dietz
well when you launch the URL, append to the URL the text from the textbox.
Example:
user clicks button, on click button event:
string url = "http://www.search.com/";
url = url + this.textbox1.Text;
System.Diagnostics.Process.Start(url);
or less code, same job:
System.Diagnostics.Process.Start("http://www.search.com/"+this.textbox1.Text);
does this help
ClaraOscura
QWERTYtech
Sam Jost
Error 1 'Thottbot.Form1' does not contain a definition for 'theTextBox' C:\Documents and Settings\Justin\My Documents\Visual Studio 2005\Projects\Thottbot\Thottbot\Form1.cs 40 22 Thottbot
Error 2 'Thottbot.Form1' does not contain a definition for 'theButton' C:\Documents and Settings\Justin\My Documents\Visual Studio 2005\Projects\Thottbot\Thottbot\Form1.cs 46 26 Thottbot
Kajal Sinha
it should do well, it adds %20 between spaces as that is what the html equivelent is.
What is the URL overall when you press that button