T
terry_zhou82
Unregistered / Unconfirmed
GUEST, unregistred user!
写了下面的代码,但是有个问题不知道怎么实现。private procedure Detect(var Msg:TMsg;var Handled:boolean); { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Detect(var Msg: TMsg; var Handled: boolean);begin (Msg.message=WM_keydown) or (Msg.message=WM_mousemove) or (Msg.Message = WM_RButtonDown) or (Msg.Message = WM_LButtonDown) thenbegin Timer1.Enabled :=Falseend;end;procedure TForm1.Timer1Timer(Sender: TObject);begin//按任意键择停止运行的代码。。。 Edit1.Visible :=not Edit1.Visible ;end;procedure TForm1.FormCreate(Sender: TObject);begin Application.OnMessage :=Detect;end;end.我就想让程序在最小化甚至是在右下角的托盘运行时,也可以实现。该怎么做呢?