Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

.ScaleWidth is not the same as converting .Width to pixels

Can anyone explain the following:

?Me.ScaleMode = vbPixels
True
?Me.ScaleWidth
 289
?Me.Width / Screen.TwipsPerPixelX
 297

Why are the two 'widths in pixels' not the same?
0
FartingUncle
Asked:
FartingUncle
  • 2
1 Solution
 
EDDYKTCommented:
scalewidth if the width without including the border of your form
0
 
FartingUncleAuthor Commented:
OK - so therefore, to set the form's interior width to 200px I should use the following:

Me.Width = ((Me.Width / Screen.TwipsPerPixelX) - Me.ScaleWidth + 200) * Screen.TwipsPerPixelX
0
 
Mark_FreeSoftwareCommented:
yes
0
 
FartingUncleAuthor Commented:
Good - Thank you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now