如何在消息中使用一些变量来更改消息对话框的标题。我试过了
Application.MessageBox('x * y = ' + result, 'this is title', MBICONINFORMATION);
Run Code Online (Sandbox Code Playgroud)
但是它显示一个错误,指出不兼容的类型:“字符串”和“ PAnsiChar”,我知道这是因为不允许使用“结果”变量。有解决办法吗?之前感谢
我建议您使用Format函数,如下所示:
Application.MessageBox(PChar(Format('x * y = %s', [result])), 'this is title', MB_ICONINFORMATION);
归档时间: |
|
查看次数: |
6168 次 |
最近记录: |