Large Screen Font Fix?

Large Screen Font Fix?

Post by Sean » Mon, 18 Aug 2003 07:03:16

I have a number of graphical (interface) apps, but if someone turns on large
screen fonts it changes the screen metrics and the forms scale up and causes
huge problems (moving all the controls and making them larger than the
images they contain). Is there anything that can be done? Is there a way to
prevent large screen fonts from making a VB app that uses graphics useless?
I have implemented manual fixes in the past (iterating through the controls
and scaling them back down) but this is only a half fix and for some reason
does not seem to be working on my latest project.

I'm using VB6 if it is of any interest. Any tips or suggestions are much

Large Screen Font Fix?

Post by gene kelle » Tue, 19 Aug 2003 04:00:02

On Sun, 17 Aug 2003 08:03:16 +1000, "Sean"

1) There is an older MS Knowledge Base article on this that suggests
to use Pixel ScaleMode rather than Twips. It does the job, but from
what I have read recently, some say it is not currently the preferred

2) In Twips ScaleMode, controls that have a graphic should be
resized at runtime using Screen.TwipsPerPixel. For a 320 x 240
picture, a flat picture box whose width is 320*Screen.TwipsPerPixelX
and whose height is 240*Screen.TwipsPerPixelY will be the correct
container size in any font setting.

3) I have a couple of commercial apps (games especially) that check
for font setting at startup. If other than small (normal) font
setting, they simply display a message telling the user to change
their font setting to small (normal) in order to run the app. Not a
desirable method IMO.



Large Screen Font Fix?

Post by Rocky Clar » Tue, 19 Aug 2003 22:12:19

Set your ScaleMode to Twips. Do all of your calculations in pixels and then
convert your final coordinates to Twips using Screen.TwipsPerPixelX/Y. This
will solve your problem, since there are only 12 TwipsPerPixel for large
fonts as opposed to 15 TwipsPerPixel for normal fonts. In other words, a
100px by 50px control will convert to 1200tw by 600tw on a system using
large fonts, but on a system using normal fonts it will convert to 1500tw by
750tw. This will appear to be the same screen size on both systems.



Large Screen Font Fix?

Post by Albrecht R » Wed, 20 Aug 2003 15:27:05

ust use

if typeof Control(G) Is VB.PictureBox Then ' just an example

"Sean" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...


Large Screen Font Fix?

Post by gene kelle » Thu, 21 Aug 2003 03:37:43

On Tue, 19 Aug 2003 08:08:28 +1000, "Sean"

What you seem to be doing here is defeating a visually impaired user's
ability to determine what's best for the user. People I know that use
a Large Font setting have some difficulties with the default 8 point
font in small font setting. In these cases, 7 point fonts would be a
tough proposition. Dynamically laying out the controls takes bit more
code, but is the more elegant and correct approach IMO.


Large Screen Font Fix?

Post by Rocky Clar » Thu, 21 Aug 2003 21:26:33

I agree with Gene on this point. I thought you were trying to position the
controls on your form, not change the font size. I use screen sizes 1600 x
1200 or greater. If I bought your program and it used a 7 point font size,
it would force me to decrease my screen resolution in order to read your
text. However, I would not do that. I would just ship your program back to
you for a refund.