Created
December 15, 2017 20:07
-
-
Save kuangzhang/4785e787a59470ff414a837da421b0fa to your computer and use it in GitHub Desktop.
This Code Snippet Open Internet Explore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using SHDocVw; | |
| public static class Helper | |
| { | |
| private static void OpenIE() | |
| { | |
| object o = new object(); | |
| // Can point to a local file as well C:\My File Path\MyFile.txt | |
| string _Url = "www.Yahoo.com"; | |
| InternetExplorer ie = new InternetExplorerClass(); | |
| IWebBrowserApp wb = (IWebBrowserApp)ie; | |
| wb.Visible = true; | |
| wb.Navigate(_Url, ref o, ref o, ref o, ref o); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment