Method 1:Private voidButton1_Click (Objectsender, EventArgs e) Geneva. { Geneva.//read the default browser executable file path from the registryGeneva. RegistryKey key = Registry.ClassesRoot.OpenSubKey (@"http\shell\open\command\"); to.strings = key. GetValue (""). ToString (); .. -.//S is your default browser, but with the parameters behind it, cut it, but note that the parameters behind the different browsers are not the same! ,.//"D:\Program Files (x86) \google\chrome\application\chrome.exe"--"%1" the. System.Diagnostics.Process.Start (S.substring (0, S.length-8),"http://blog.csdn.net/testcs_dn"); Ten.} Method 2:Private voidButton2_Click (Objectsender, EventArgs e) Geneva. { Geneva.//invoking the system's default browserGeneva. System.Diagnostics.Process.Start ("Explorer.exe","http://blog.csdn.net/testcs_dn"); to.} Method 3:Private voidButton3_Click (Objectsender, EventArgs e) Geneva. { Geneva.//invoking the system's default browserGeneva. System.Diagnostics.Process.Start ("http://blog.csdn.net/testcs_dn"); to.} Method 4:Private voidButton4_Click (Objectsender, EventArgs e) Geneva. { Geneva.//Call IE browserGeneva. System.Diagnostics.Process.Start ("Iexplore.exe","http://blog.csdn.net/testcs_dn"); to.}
Original address: http://blog.csdn.net/testcs_dn/article/details/42246969#
WinForm Invoking the browser