Relative sizing of controls ( to screen size ) ? (1 Viewer)

liamfitz

Registered User.
Local time
Today, 00:49
Joined
May 17, 2012
Messages
240
I'd like to set the width & height properties of my controls, in ( Pixels or twips ), rather than cms, so that they adjust proportionally according to the size/dimension of the screen, my form loads in. I know in the property sheet, you can only set the measurement in cms. However in vba, at run-time, these properties are set in either twips or pixels ( not sure which ). So my code might look like ...
Code:
MyCtl.Width = (MyCtl.Width/2.54) * 1440

I believe there are 1440 twips per inch, and 2.54 cms. per inch. More importantly, do the number of twips change dependent on, and relative to the screen dimension - or is it pixels ? If so, in theory, this should work. Any help appreciated.:confused:
 

Beetle

Duly Registered Boozer
Local time
Yesterday, 18:49
Joined
Apr 30, 2011
Messages
1,808
This post is a few days old, but if you're still looking for a solution to this you might find this page helpful.
 

Users who are viewing this thread

Top Bottom