Category: C#
How to open a web page from win form:
Using Microsoft Internet Control 1.1: You can add the Microsoft Internet Control 1.1 reference to your application, then you can use it like this:
SHDocVw.InternetExplorerClass ie=new SHDocVw.InternetExplorerClass (); Object vHeaders = null; Object vPost = null; Object vTarget = null; Object vFlags = null; ie.Navigate("http://www.google.com",ref vFlags,ref vTarget,ref vPost,ref vHeaders); ie.Visible =true;
Using installed Internet Explorer:
System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = "iexplore"; proc.StartInfo.Arguments = "http://www.google.com/"; proc.Start();
Tags:
C#