uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, SHDocVw;
type
TForm1 = class(TForm)
mainweb: TWebBrowser;
procedure FormCreate(Sender: TObject);
procedure mainwebNewWindow2(Sender: TObject; var ppDisp: IDispatch;
var Cancel: WordBool);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
mainweb.Navigate('www.ya.ru');
end;
procedure TForm1.mainwebNewWindow2(Sender: TObject; var ppDisp: IDispatch;
var Cancel: WordBool);
var
newForm:TForm2;
begin
newForm:=TForm2.Create(Application);
newForm.Show;
ppDisp:=newForm.mainweb2.ControlInterface;
end;
end.