unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, SHDocVw,MSHTML, StdCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
WebBrowser1: TWebBrowser;
Button1: TButton;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
ie:IWebBrowser2;
aa
levariant;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
IDoc: IHTMLDocument2;
begin
ie:=CoInternetExplorer.Create;
ie.Stop ;
ie.Visible:=wordbool(true);
ie.Navigate('http://server/doctorschoolf/facility/index.aspx',aa,aa,aa,aa);
ie.Visible:=wordbool(true);
WebBrowser1.Navigate('http://server/doctorschoolf/facility/index.aspx');
// ie.Document.QueryInterface(IHTMLDocument2,IDoc);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
IDoc: IHTMLDocument2;
begin
WebBrowser1.Document.QueryInterface(IHTMLDocument2,IDoc);
memo1.Text:=idoc.body.innerHTML;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ie.ExecWB(OLECMDID_PREREFRESH,aa,aa,aa);
end;
end.