替换是/否/取消的MessageBox(C#) [英] Replacement for yes/no/cancel MessageBox (C#)

查看:421
本文介绍了替换是/否/取消的MessageBox(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一个体面的替代标准的Windows YES / NO或YES / NO / CANCEL消息框。

I am looking for a decent replacement for the standard windows YES/NO or YES/NO/CANCEL MessageBox.

我经常看到的方式滥用这些标准对话框如:要以纯文本格式保存回答YES或HTML回答NO保存。显然,文字应改为另存为:与按钮应被标记为文本和HTML。这不是一个是/否的问题正在被问过了,虽然也可以表述的方式,它不会是容易阅读和理解。

I have often seen these standard dialogs misused in ways such as: "To save in plain text answer YES, or to save in html answer NO". Obviously, the text should read "Save As: and the "buttons should be labeled "Text" and "HTML". It is not a yes/no question that is being asked, and although it could be phrased that way, it would not be easy to read and understand.

微软没有给出方法来改变按钮的文字。还有就是要从头开始构建一个替代......就证明使用上面提到的尴尬风格的应用程序的数量没有快速/简单的方法。

Microsoft gives no way to change the text on the buttons. There is no fast/simple way to build a replacement from scratch... as evidenced by the number of applications using the awkward style mentioned above.


是有没有免费的C#替换对话框或消息框在那里,让你至少有:结果
- 指定结果
键的数量 - 出现在每个按键结果$ b指定文本$ b - 指定默认按钮结果
的结果
我已经看了看,一直无法找到一个

Is there any free C# replacement dialog or MessageBox out there that lets you at least:
- specify the number of buttons
- specify the text to appear on each button
- specify the default button

I have looked and have been unable to find one.

(我将建立一个自己,但我不是所有的功能齐全的控制应该有足够的行为熟悉,因为我只需要/使用/知道一小部分的两个例子,我不使用:主题和国际化。我需要的东西,我的同事也将要使用)

(I would build one myself, but I am not familiar enough with all the behaviors that a fully functional control should have, since I only need/use/know a small subset. Two examples I don't use: themes and internationalization. I need something that my coworkers will also want to use.)

推荐答案

检查出的剖析在CodeProject上的MessageBox 。该项目是一个有点过时,但它几乎是你在寻找什么,它不应该花太多更新它。

Check out Dissecting the MessageBox on CodeProject. The project is a bit dated, but it's pretty much exactly what you're looking for and it shouldn't take much to update it.

这篇关于替换是/否/取消的MessageBox(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆