C# – Change font size in a Windows Forms application

cwindows-applicationswinforms

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.

Below is the screen shot of my application in both the Hindi and English language.

Hindi Font

Hindi

English Font

English

Best Answer

No, you can not change the font size within a MessageBox. The MessageBox font size is defined by the user's operating system.

The only way you can do this, is by creating your own custom Message Box:

How To Make a Custom Message Box

To change the Windows Forms form font, just use the Form's Font Property:

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.