求大神来看看谢谢了
if(MessageDlg('This is a test', mtConfirmation, , 0 )= mbYes ) then
ShowMessage('Yes')
else
ShowMessage('NO');
为什么显示
Unit1.pas(66): E2008 Incompatible types
MessageDlg('This is a test', mtConfirmation, , 0 )= mbYes
改为
MessageDlg('This is a test', mtConfirmation, , 0 )= mrYes
mbYes是TMsgDlgButtons类型,而mrYes是系统常量
给你个按钮对照表:
mbYes——mrYes或6
mbNo——mrNo或7
mbOk——mrOk或1
mbCancel——mrCancel或2
mbHelp——help按钮
mbAbort——mrAbort或3
mbRetry——mrRetry或4
mbIgnore——mrIgnore或5
mbAll——mrAll或8
mbNoToAll——9
mbYesToAll——10
建议给楼上加分
解释清晰! comeheres 发表于 2013-7-23 14:33 static/image/common/back.gif
MessageDlg('This is a test', mtConfirmation, , 0 )= mbYes
改为
老师谢谢你了!!! 苏小宁 发表于 2013-7-23 21:48 static/image/common/back.gif
老师谢谢你了!!!
{:5_110:}我也是刚入门,老师就严重了
页:
[1]