unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
AppEvnts, OleCtrls, SHDocVw, StdCtrls;
type
TForm1 = class(TForm)
WebBrowser1: TWebBrowser;
Button1: TButton;
procedure ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if Msg.message=WM_LBUTTONDBLCLK then
button1.Caption:='a';
Handled:=false;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMessage:=ApplicationEvents1Message;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
webbrowser1.Navigate('www.gislab.ecnu.edu.cn');
end;
end.