[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2006-07-20
4
Medium Priority
?
353 Views
Last Modified: 2010-04-30
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
Comment
Question by:FartingUncle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 500 total points
ID: 17147384
scalewidth if the width without including the border of your form
0
 
LVL 1

Author Comment

by:FartingUncle
ID: 17147441
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
 
LVL 13

Expert Comment

by:Mark_FreeSoftware
ID: 17149863
yes
0
 
LVL 1

Author Comment

by:FartingUncle
ID: 17150443
Good - Thank you.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question