I'm using VB6 if it is of any interest. Any tips or suggestions are much
appreciated!
Yes, but it involves sizing your form without the presumption
of "Small Fonts" being the norm. I suspect this is a redesign
for you, and it involves too many forms to be practical.
> 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.
Font selection is a bit of a trap-door function, in that it's
difficult to develop a retroactive inverse function to
"correct" it. I've seen users, however, that benefit from being
able to configure their system this way. How much would it
take for your program to account for this setting? (ie, not
just try to undo it.)
Large Fonts Suck
http://www.divsoft.com/lfs/
--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep it in the groups..
"Sean" <Se...@NoSpamJustPostToTheGroupPlease.net> wrote in message
news:%23LnjLME...@TK2MSFTNGP09.phx.gbl...
Thanks for the suggestions. I had also posted this question on another
group, so I'll post my reponse here in the hope it might benefit someone:
The problem with that method [using twips and twipsperpixel in all graphic
and control placement calculations] is it has to be implemented throughout
the code. If you're dynamically placing your images and controls, and basing
your calculations (and ScaleMode) on pixels, then no problem exists. A pixel
is still a pixel when placed dynamically. Where I have found the problem is
in static controls. These controls are all scaled up and moved to the right
and down. Therefore in the past I simply developed a small routine that
iterates through the controls. For anyone else who wants to deal with Large
Screen Fonts with an easy and reasonable solution, the method I use is
essentially the following:
Private Sub LargeScreenFontFix()
Dim ScreenMetric As Single
Dim G as Integer
Dim LabType As String
ScreenMetric = Screen.TwipsPerPixelX / 15
If ScreenMetric = 1 Then Exit Sub
For G = 0 To Controls.Count - 1
LabType = Left(LCase(Controls(G).Name), 3)
If LabType = "pic" Or LabType = "lbl" Or LabType = "txt" Or LabType
= "cmd" Then
Controls(G).Left = Controls(G).Left * ScreenMetric
Controls(G).Top = Controls(G).Top * ScreenMetric
Controls(G).Width = Controls(G).Width * ScreenMetric
Controls(G).Height = Controls(G).Height * ScreenMetric
Controls(G).Font = "Arial"
Controls(G).FontSize = 7
End If
Next G
End Sub
It's not commented but what it's doing should be obvious. It may need to be
customized depending on the application, but it's a great solution to the
problem. I found my problem with my latest app was that one of the control
array names I had started with "Pic", rather than "pic". Hence I changed all
control names to lowercase in the code above, and now I'm back up and
running. Hope this helps someone!
All the Best,
Sean
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:OTm1tWZ...@tk2msftngp13.phx.gbl...