ScaleMode and TwipsPerPixel, their role in sizing problems due to Large/Small fonts
Ok...
TwipsPerPixel in small fonts (normal, windows default) is 15. So when we change that to large fonts and the TwipsPerPixel value changes to 12... this causes sizing problems on our form. For example... a 10 pixel image in small fonts is 150 twips wide. But in large fonts it is only 120 twips wide. This means that the image is actually displayed smaller in the large fonts mode.
To overcome this I found if you change the ScaleMode property of the form housing all the controls to the right factor...
VB Code:
Form.ScaleMode = vbUser
Form.ScaleWidth = (TwipsPerPixel / 15) * Form.Width
Form.ScaleHeight = (TwipsPerPixel / 15) * Form.Height
This would then make our own coordinate system that would account for the font scaling. So when we say Label1.Left = 15, this would put the label in the proper position regardless of what the TwipsperPixel value is.
My question is: Do I have to re-position every control in code to make this work?