16,748
社区成员
发帖
与我相关
我的任务
分享
MessageDlg('Choose a button:', System.UITypes.TMsgDlgType.mtInformation,
[
System.UITypes.TMsgDlgBtn.mbYes,
System.UITypes.TMsgDlgBtn.mbNo,
System.UITypes.TMsgDlgBtn.mbCancel
], 0,
procedure(const AResult: TModalResult)
begin
if AResult = mrYES then
ShowMessage('You chose Yes') else
if AResult = mrNo then
ShowMessage('You chose No') else
if AResult = mrCancel then
ShowMessage('You chose Cancel');
end);
刚测试了这样写确实好了!