Link to home
Start Free TrialLog in
Avatar of Jimmyx1000
Jimmyx1000

asked on

Visual basic Font Size Problem vb6

Hello I have designed a layout with a form and various
command buttons  and small font mode
(under windows display properties  : small font )

When I change the windows to large font size

the command buttons buttons change size
the listbox and listview has changed  position

What can i do ???
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Have you tried to use true font size like arial?
Control dimensions are proportional to font size, in you increase the font size, button size will increase too.
When you change from small to large (or normal) fonts in the display settings dialog, you may see a change in the value of screen.twipsperpixelx and screen.twipsperpixely.  This also makes your form's scalewidth and scaleheight values change.  So the positions of the controls may also be affected.

I had this problem a few years back, but found no easy fix.  It is tedious to position each control via code, so I opted to require the customer to use a predefined screen setting.  This is not a viable option for most applications.

The only thing I can suggest is do not assume that the value of twipsperpixel=15, sometimes it's 12.
ASKER CERTIFIED SOLUTION
Avatar of Erick37
Erick37
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