C# open InternetExplorer ####NEWBIE QUESTION###

  • Thread starter Thread starter WolfgangD
  • Start date Start date
W

WolfgangD

Hi,
I am new in C# and MS programming.

I created a simple windows form .
In this form is a button and a text field.
the user should enter an ip-adress into the textfield ...and if he
clicks on the button a new Internet explorer windows should vome up
with the ip adress information (http://10.x.x.x) he entered in the
text field.

How can I realise this ?


Thanks a lot!
 
usign web explorer component (ctrl+alt +x), then using the navigate method,
send the ip to there and it all show up.
 
usign web explorer component (ctrl+alt +x), then using the navigate method,
send the ip to there and it all show up.

Great,
I added a WebBrowser Element:

private void textBox1_TextChanged(object sender, EventArgs e)
{
webBrowser1.Navigate(textBox1.Text);
}

private void webBrowser1_DocumentCompleted(object sender,
WebBrowserDocumentCompletedEventArgs e)
{


Now it is opening the Ip inside it...But how can I send the Ip to the
default Internet Explorer window????


Thanks
 
Wolfgang,

If you want to open the default browser, then all you have to do is
create a url and then pass that to the Process class. Basically, you would
create the string "http://10.x.x.x" and then pass that to the Process class.
The OS will then launch the default browser for the system with that URL.
 
Wolfgang,

If you want to open the default browser, then all you have to do is
create a url and then pass that to the Process class. Basically, you would
create the string "http://10.x.x.x" and then pass that to the Process class.
The OS will then launch the default browser for the system with that URL.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Hi,
I am new in C# and MS programming.
I created a simple windows form .
In this form is a button and a text field.
the user should enter an ip-adress into the textfield ...and if he
clicks on the button a new Internet explorer windows should vome up
with the ip adress information (http://10.x.x.x) he entered in the
text field.
How can I realise this ?
Thanks a lot!

Hi,
thanks


....

I found this:
System.Diagnostics.Process process = new System.Diagnostics.Process();

process.StartInfo.FileName = URL;

process.Start();

That works great!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top