1
Answer

Exception : Browser not valid for Mozilla browser

Lalit Nayak

Lalit Nayak

14y
4.4k
1

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)