Hi,

I've been working with the control and Delphi and came across the same
problems as you describe.

Print Preview doesn't work because the control doesn't contain the right
methods. I don't think it can because it is an encapsulation of the GRE and
I think the Print Preview window is part of the Mozilla Browser app. (I'm
not familiar enough with the source to be sure.)

I managed to get Print to work though. You should be able to translate the
command I'm using:

mzGecko.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER);

In Delphi to get any ExecWB command to work you first have to call the
OleInitialize method (and call OleUninitialize before exiting your program).
I don't know if VB requires a similar function but you would also have to
use it for the IE's WebBrowser control.

Hope this helps,
Dave.

Dave Murray
Glasgow, UK
PGP KeyID: 0x838592B3


"Lotas Smartman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> im developing a web browser written in VB. its a direct port from IE to
> mozilla. a lot of features worked just by dropping the mozilla control
> in from the embed.zip file in the nightly builds. but the code for print
> preview and print dont work. im using an MDI form for this. the current
> code i have is:
> frmMain.ActiveForm.browser.ExecWB OLECMDID_PRINTPREVIEW,
> OLECMDEXECOPT_DODEFAULT
> but it crashes and says that:
> runtime error '-2147417848 (80010108)':
> method 'execwb' of object 'IWebBrowser2' failed.
> Any ideas? the project is hosted on SF at
> www.sf.net/projects/lsnosbrowser. the CVS three has just been uploaded
> and the zip is there too. any help would be cool!
> Thanks
> Lotas
> www.lotas-smartman.net
>
>
>



Reply via email to