|

楼主 |
发表于 2008-4-28 10:10:16
|
显示全部楼层
用这种方式怎么也不行啊?
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure AppMsg(var Msg: TMsg; var Handled: Boolean);
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.AppMsg(var Msg: TMsg; var Handled: Boolean);
begin
if (Msg.message = WM_LBUTTONUP)then
showmessage('fa');
end;
procedure TForm2.FormShow(Sender: TObject);
begin
Application.OnMessage := AppMsg;
end;
end. |
|