Solved

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

Posted on 2004-04-25
6
955 Views
Last Modified: 2013-12-03
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
0
Comment
Question by:jwbryant
6 Comments
 
LVL 2

Expert Comment

by:taherzm
ID: 10911837
You might want to consider using images for labels instead...this way what ever the font setting maybe the label size will remain same...
0
 

Author Comment

by:jwbryant
ID: 10911899
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
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 250 total points
ID: 10912073
Could you not set the fontsize yourself in code? say on a load of a form

Was wondering if you created a function which takes a form as a parameter

then this function can go thru the controls and set fontsize


This is just an idea, I havent got VB installed so I cant test it,

e.g.

Form_Load function

   SetFontSizes Me



then function SetFontSizes(byval Me As Form)

   Foreach ctrl in Me.Controls
      if ctrl.Type = ... then ctrl.FontSize ..
   next


Note the above code is just like pseudo code, not proper VB, as I am not sure of the exact syntax
0
 
LVL 3

Expert Comment

by:Phoenixric
ID: 10927179
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.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping2 challenge 13 91
Scripting vs. Programming languages 25 166
How to Convert a Quote to an Order in SalesForce 2 43
Math Equation 23 88
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A short article about a problem I had getting the GPS LocationListener working.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question