Click here to Skip to main content
14,545,210 members
Rate this:
Please Sign up or sign in to vote.
I'm just wondering while I'm looking at my project it has 6 forms and a bunch of labels and textboxes. Can I change the font style or font sizes of the controls all at once without having to edit them one by one in the designer?

What I have tried:

I didn't try anything yet because I don't have any idea how to start it. The idea of changing the fonts and style just pop up in my head while staring at my project.
Posted
Updated 16-May-20 19:35pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

No, you have to either skin your form: Skinning form VB.NET[^] which will mean changes to a lot of your existing app, or use the Control.Controls Property (System.Windows.Forms) | Microsoft Docs[^] recursively to set your font height in your form constructor. Bear in mind that changing the font size will not alter the size of controls, so expect clipped text or tiny text in big buttons, etc.

Generally speaking, automated font sizing doesn't work well in Win Forms from a user perspective.


And ... generally speaking, font size is a user decision: make text smaller than default, and it's hard for them to read, make it bigger and you start to look "Fisher Price". The chances are your app will start to look ugly, or patronising if you aren't really careful.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100