0

always open with IE, how to open with Defalut browser,like firefox or chrome

Jason Wong
  • 216
  • 3
  • 14

2 Answers2

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