首页  编辑  

像用webbrowser一样 使用 firefox

Tags: /超级猛料/COM、ActiveX,DDE/   Date Created:

一个delphi写的例子 , 像用webbrowser一样 使用 firefox:

Using FireFox instead of TWebBrowser in Delphi applications

http://www.paranoia.clara.net/articles/taming_the_lizard_with_delphi.html

摘抄

unit MainForm;

{Main Form unit for Gecko Browser, a demo of embedding Gecko in Delphi 5+ apps}

uses

MOZILLACONTROLLib_TLB;

mzGecko: TMozillaBrowser

mzGecko.Navigate(WideString(HOME_ADDRESS)); {home page}

mzGecko.Navigate(WideString(START_ADDRESS)); {custom start page}

PageFilename := mzGecko.LocationName + '.html';

mzGecko.ExecWB(OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER {OLECMDEXECOPT_DODEFAULT}, PageFilename);

mzGecko.GoBack;

mzGecko.GoForward