会产生Application.OnActivate事件,测试程序如下:<br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs;<br><br>type<br> TForm1 = class(TForm)<br> procedure AppActivate(Sender: TObject);<br> procedure FormCreate(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>procedure TForm1.AppActivate(Sender: TObject);<br>begin<br> showmessage('AppOnActivate');<br>end;<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br> Application.OnActivate := AppActivate;<br>end;<br><br>end.<br>