Form的OnClose事件或OnDestroy事件(看需要),加入这段代码:<br>procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);<br>var CloseTime: Cardinal;<br>begin<br> CloseTime := GetTickCount + 5000;<br> while GetTickCount < CloseTime do<br> Application.ProcessMessages;<br>end;<br>