Setting the "Address" of INternet Explorer through C#
-
I am a novice user and would like to know if is it poosible to set the "Address" field of the Internet Explorer through C#(only C#, no other language). I want to open Internet Explorer on the press of a button, such that the address field is set to a url that I want ie which is sent through the application.
-
I am a novice user and would like to know if is it poosible to set the "Address" field of the Internet Explorer through C#(only C#, no other language). I want to open Internet Explorer on the press of a button, such that the address field is set to a url that I want ie which is sent through the application.
Hi, u can use this code to launch the internet explorer at a click of a button. Make sure u use namespace System.Diagnostics
private void button3_Click(object sender, EventArgs e)
{
Process proc=new Process();
proc.StartInfo.FileName = "iexplore.exe";
proc.Start();
}Cheers
-
Hi, u can use this code to launch the internet explorer at a click of a button. Make sure u use namespace System.Diagnostics
private void button3_Click(object sender, EventArgs e)
{
Process proc=new Process();
proc.StartInfo.FileName = "iexplore.exe";
proc.Start();
}Cheers
Better than that you can actually do the following
Process pr = new Process(); pr.StartInfo = new ProcessStartInfo("http://www.google.com"); pr.Start();
If IE is set up to handle HTTP items then it will actually open and automatically direct you to google.... -
I am a novice user and would like to know if is it poosible to set the "Address" field of the Internet Explorer through C#(only C#, no other language). I want to open Internet Explorer on the press of a button, such that the address field is set to a url that I want ie which is sent through the application.
you can try to using SHDocVw.InternetExplorer. EX: object obj = null; SHDocVw.InternetExplorer ie = new SHDocVw.InternetExplorer(); ie.Visible = true; ie.Navigate("http://pzs8417.spaces.live.com/default.aspx", ref obj, ref obj, ref obj, ref obj);
-
I am a novice user and would like to know if is it poosible to set the "Address" field of the Internet Explorer through C#(only C#, no other language). I want to open Internet Explorer on the press of a button, such that the address field is set to a url that I want ie which is sent through the application.
I think the Question was "to set the "Address" field of the Internet Explorer" and it is not "how to start IE" so here is my answer, You can call the static method of process class eg: Process.Start("iexplore","www.msn.com") the second parameter is actually passed a a command line argument to the executing file you can also use "StartInfo.Arguments" property but for that you need to create an object of process . so the first one is the easiest way in which we dont have to create any object and dont forget to add a reference to "System.Diagnostics" namespace hope this helps :)
Shyam my blogs dotnetscoups.blogspot.com . swthoughts.blogspot.com .
-
I am a novice user and would like to know if is it poosible to set the "Address" field of the Internet Explorer through C#(only C#, no other language). I want to open Internet Explorer on the press of a button, such that the address field is set to a url that I want ie which is sent through the application.
-
I think the Question was "to set the "Address" field of the Internet Explorer" and it is not "how to start IE" so here is my answer, You can call the static method of process class eg: Process.Start("iexplore","www.msn.com") the second parameter is actually passed a a command line argument to the executing file you can also use "StartInfo.Arguments" property but for that you need to create an object of process . so the first one is the easiest way in which we dont have to create any object and dont forget to add a reference to "System.Diagnostics" namespace hope this helps :)
Shyam my blogs dotnetscoups.blogspot.com . swthoughts.blogspot.com .