Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i want to change font of my whole c# windows application with a form (i.e. Themes)

ichange the color scheme of all windows form like this
C#
protected override void OnPaintBackground(PaintEventArgs e)
      {
       using (LinearGradientBrush brush = new LinearGradientBrush (this.ClientRectangle, GlobalVar.GlobalValue, GlobalVar.GlobalValue, 90F))
          {
              e.Graphics.FillRectangle(brush, this.ClientRectangle);
          }
      }


i want to do same thing with changing font.. with global variables
please help
Posted
Updated 8-Oct-12 22:32pm
v2

1 solution

You can add before InitializeComponent() in the Form constructor(s):

C#
this.Font = SystemFonts.MessageBoxFont; 
 
Share this answer
 
Comments
choudhary.sumit 9-Oct-12 4:25am    
sory.. i cant understand you. what is the messageboxfont here.. will you please explain in detail?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900