always open with IE, how to open with Defalut browser,like firefox or chrome
Asked
Active
Viewed 2,116 times
0
-
How are you opening the links? Please provide a code sample. – Jason Jun 11 '12 at 03:58
-
There are a few threads on it already http://stackoverflow.com/questions/4580263/how-to-open-in-default-browser-in-c-sharp – effin nukes Jun 11 '12 at 04:02
-
The WebBrowser control or "a link"? – Jun 11 '12 at 04:44
2 Answers
2
Go to solution explorer -> right click on project -> select Browse with
it will open a Browse with window, having a list of available browser in your pc
select it to browse or make selected browser as default browser.

vikrantx
- 593
- 5
- 22
0
public class MyWebBrowser : WebBrowser
{
public MyWebBrowser() : base(){ }
protected override void OnNewWindow(System.ComponentModel.CancelEventArgs e)
{
try
{
Process.Start(StatusText);
}
catch(Exception e)
{
//Display error message
}
e.Cancel = true;
base.OnNewWindow(e);
}
}
EDIT: Never mind, this won't work well. It will open the link the mouse is over instead on the one the user actually clicks (if they use the keyboard to click) and it is a huge security risk.

dougzhoez
- 1
- 1
-
1I think this answer might fit better anyways: http://stackoverflow.com/q/4580263/938695 – Austin Henley Sep 24 '12 at 05:13