How to create simple browser with Mozilla ActiveX

2020-07-30 04:20发布

问题:

I download and install Mozilla ActiveX Control

and add MozillaBrowser Class to ToolBox

Create a windows form application windows, drag drop MozillaBrowser from ToolBox to Form1

also drag drop a WebBrowser1 to Form1

in Form1_Load write this:

WebBrowser1.ActiveXInstance = AxMozillaBrowser1

but Error Property 'ActiveXInstance' is 'ReadOnly'.

I want display a fix URL in Mozilla browser, Now I must what to do?

回答1:

As I understand it this control is a direct replacement for the WebBrowser control so you should just add an instance of the control on your form and then something like this should work:

AxMozillaBrowser1.Navigate2("http://www.bbc.co.uk")

have a look at this wrapper which may help you on code project: http://www.codeproject.com/Articles/20312/Browsers-Wrapper-Mozilla-IE