必须要有激发的条件啊。例如用于回调或者发送一个消息啊:<br>一个简单的例子:<br>const MyMessage=WM_USER+100;<br>type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> procedure MyMessageProc(var msg:TMessage);message MyMessage;<br> private<br> public<br> end;<br>var<br> Form1: TForm1;<br>implementation<br>{$R *.DFM}<br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> sendmessage(handle,mymessage,0,0);<br>end;<br><br>procedure TForm1.MyMessageProc(var msg: TMessage);<br>begin<br> showmessage('fksdfds');<br>end;<br>end.