如何使webbrowser弹出窗口的form呈现应有的大小
// http://groups.yahoo.com/group/delphi-webbrowser/message/6162
// SHDocVw_tlb:
//component/import activex control/microsoft internet controls[version 1.1]/create unit
uses SHDocVw_tlb
// Define Event for the Main Component (a TForm)
type
TfrmWB = class(TForm)
...
WB: TEmbeddedWB;
...
procedure WB_OnWindowSetLeft(Sender: TObject; Left: Integer);
...
End;
var
frmWB : TfrmWB;
// Wrap Event from WB Object (TEmbedded) on our procedure
procedure TfrmWB.FormCreate(Sender: TObject);
begin
...
WB.OnWindowSetLeft := WB_OnWindowSetLeft;
...
End;
// define our procedure
procedure TfrmWB.WB_OnWindowSetLeft(Sender: TObject; Left: Integer);
Begin
frmWB.Left := Left;
End;
You need to do the same thing for all other events...
procedure WB_OnWindowSetResizable (Sender: TObject; Resizable:
WordBool);
procedure WB_OnWindowSetLeft(Sender: TObject; Left: Integer);
procedure WB_OnWindowSetTop(Sender: TObject; Top: Integer);
procedure WB_OnWindowSetWidth(Sender: TObject; Width: Integer);
procedure WB_OnWindowSetHeight(Sender: TObject; Height: Integer);
procedure WB_OnWindowClosing(Sender: TObject; IsChildWindow:
WordBool; var Cancel: WordBool);
procedure WB_OnVisible(Sender: TObject; Visible: WordBool);
procedure WB_OnToolBar(Sender: TObject; ToolBar: WordBool);
procedure WB_OnMenuBar(Sender: TObject; MenuBar: WordBool);
procedure WB_OnStatusBar(Sender: TObject; StatusBar: WordBool);
That s all !!!