[英]Change font size in a Windows Forms application
Here below: 在这下面:
My Windows Forms application have functionality to change language, but my problem is that when my application in English fonts look much finer than in Hindi fonts. 我的Windows窗体应用程序具有更改语言的功能,但我的问题是,当我的英文字体应用程序看起来比印地语字体更精细。
Below is the screen shot of my application in both the Hindi and English language. 以下是我的应用程序的印地语和英语语言的屏幕截图。
No, you can not change the font size within a MessageBox. 不,您无法更改MessageBox中的字体大小。 The MessageBox font size is defined by the user's operating system. MessageBox字体大小由用户的操作系统定义。
The only way you can do this, is by creating your own custom Message Box: 您可以这样做的唯一方法是创建自己的自定义消息框:
To change the Windows Forms form font, just use the Form's Font Property : 要更改Windows窗体表单字体,只需使用窗体的字体属性 :
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
this.Font = new System.Drawing.Font(
"Microsoft Sans Serif",
24F,
System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point,
((byte)(0)));
}
}
Replace "24F" with the desired font size. 将“24F”替换为所需的字体大小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.