messagebox()地返回值可以判断 IDOK 1 The user chose the OK button. IDCANCEL 2 The user chose the Cancel button. IDABORT 3 The user chose the Abort button. IDRETRY 4 The user chose the Retry button. IDIGNORE 5 The user chose the Ignore button. IDYES 6 The user chose the Yes button. IDNO 7 The user chose the No button.
ShowMessage('点击了YES按钮')
else
ShowMessage('点击了NO按钮');
MessageDlg('这里是你的内容',mtConfirmation,mbYesNoCancel,0),返回的事实上是一个整数,当然也可以用mrYes,mrNo,mrCancel来表示返回的结果
IDOK 1 The user chose the OK button.
IDCANCEL 2 The user chose the Cancel button.
IDABORT 3 The user chose the Abort button.
IDRETRY 4 The user chose the Retry button.
IDIGNORE 5 The user chose the Ignore button.
IDYES 6 The user chose the Yes button.
IDNO 7 The user chose the No button.