procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);<br>begin<br> If application.MessageBox ('是否要退出本系统?',pChar('提示信息'),mb_yesno+mb_iconquestion)=idyes then<br> canclose:=true<br> Else<br> Begin<br> canclose:=false;<br> //...<br> end;<br><br>end;