Link to home
Start Free TrialLog in
Avatar of jwbryant
jwbryant

asked on

VB6 Force Font Size on Form, Ignore Settings/Large Fonts in VB6

Hello All!

I've got an application that uses a specific font (Tw Cen MT Condensed). My installer provides the font without problem.  However, I've found that some users have their system fontsize set to /Large or /ExtraLarge.  This causes most of the labels on my application's forms to display improperly.  Note:  I really need to use this font because I need the screen real estate it provides.

So......

My question is:   Is there a way to FORCE fontsize in my application?  Can I override the users system/fontsize setting for my application only?

Thanks in advance for the help!

JWB
Avatar of taherzm
taherzm

You might want to consider using images for labels instead...this way what ever the font setting maybe the label size will remain same...
Avatar of jwbryant

ASKER

Thanks for the quick comment!

The primary reason that I chose to use labels is so that I can programatically re-brand the application by changing a single line in the app INI file.  So, I'm afraid that I'm stuck with labels.

Thanks!

JWB
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

If you think you get stuck with labels, you can override the fontsize in your application using the label fontsize property.

Sample code:

Private Sub Form_Load()
    Label1.FontSize = 12
End Sub

Please get back to me if this doesn't work.