Lalit Nayak

Lalit Nayak

  • NA
  • 1
  • 5k

Exception : Browser not valid for Mozilla browser

Sep 14 2010 5:03 AM

I am trying to navigate URL using Mozilla browser but I am getting exception "Browser not in valid state".please find below the code snippent.
This is working good for IE but not for mozilla. Can anyone help me on this regards.
 
MOZILLACONTROLLib.
MozillaBrowser ie = Activator.CreateInstance(oType) as MOZILLACONTROLLib.MozillaBrowser;


if (ie != null)
{
object oEmpty = "";
object oURL = "http://www.somesite.com";
ie.AddressBar =
false;
ie.MenuBar =
false;
ie.ToolBar = 0;
ie.Visible =
true;
ie.Navigate2(
ref oURL, ref oEmpty, ref oEmpty, ref oEmpty, ref oEmpty);

Answers (1)