C#格式化一个MessageBox

编程入门 行业动态 更新时间:2024-10-22 18:27:18
本文介绍了C#格式化一个MessageBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想显示一个MessageBox,提醒用户这个过程已经完成,并且对每个过程阶段花费了多长时间。我已经得到了想要正确显示格式的文本,但是MessageBox类的默认字体不是单宽度。据我所知,没有办法指定文字显示的字体。

I want to display a MessageBox alerting the user that the process is complete, and giving a breakdown on how long each stage of the process took. I've got the text that I want to display formatted appropriately, but the default font of the MessageBox class is not mono-width. As far as I can tell, there's no way to specify the font that the text displays with.

是否有一个开箱即用的库,我可以使用这个,或者我将不得不写一个自己?

Is there an out-of-the-box library somewhere that I can use for this, or am I going to have to write one up myself?

推荐答案

任何原因不只是创建一个 Form 带有等宽字体的文本框/标签,然后调用 Form.ShowDialog ?听起来像一个单独的图书馆,这将是矫枉过正的我。

Any reason not to just create a Form with a textbox/label using a monospace font, then call Form.ShowDialog? Sounds like a separate library with that would be overkill to me.

更多推荐

C#格式化一个MessageBox

本文发布于:2023-11-08 15:56:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569821.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:MessageBox

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!