哈哈。看来这100是要给我了。<br>用回调消息。<br>const<br> MY_MESSAGE =WM_USER+100;<br>nid.uCallbackMessage:=MY_MESSAGE; <br>procedure OnIconNotify(var message:Tmessage); Message MY_MESSAGE;procedure Tfrmmain.OnIconNotify(var message:Tmessage);//消息处理函数。<br>const<br> Busy :boolean=false;<br>var<br> hand :hwnd;<br> appname :string;<br> pt :Tpoint;<br><br>begin<br> appname:=application.Title;<br> hand:=FindWindow(nil,pchar(appname));<br> if not Busy then<br> begin<br> if message.LParam=WM_LBUTTONDOWN then<br> begin<br> if hand<>0 then<br> begin<br> if not IsZoomed(Handle) then<br> begin<br> ShowWindow(hand,SW_RESTORE);<br> SetForegroundWindow(hand);<br> end<br> end;<br> end;<br>end;