繁体   English   中英

如何在.net Compact Framework的底部显示确定按钮?

[英]How to display ok button at bottom in .net compact framework?

我正在用C#开发移动应用程序。 我在应用程序中使用以下代码显示消息框,但按钮ok显示在右上角。 我想在底部显示确定按钮。 这是我的代码

MessageBox.Show("Records successfully inserted","Customer Entry",MessageBoxButtons.OK,MessageBoxIcon.None,MessageBoxDefaultButton.Button1);

我的代码有什么问题吗? 还是我需要做其他事情? 您能否提供任何代码或链接来解决上述问题?

紧凑框架中的标准MessageBox行为是在右上角显示“确定”按钮(除非,我认为您使用的是Windows Mobile 6.5.x,否则它将显示在底部)。

我看到的“移动”底部的“确定”按钮的唯一方法是创建一个表单并使用它而不是MessageBox。 这意味着创建一种自定义MessageBox类。

我同意这很烦人。 特别是在小型触摸屏上工作时,很难按右上角的OK。

由于您只想显示OK按钮ID,建议您改用MessageBox.OKCancel并将任何按钮按下都视为OK。 设置除“确定”外的其他任何内容都将在底部显示按钮。

MessageBox.Show("Records successfully inserted","Customer Entry",MessageBoxButtons.OKCancel,MessageBoxIcon.None,MessageBoxDefaultButton.Button1);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM