Solved

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

Posted on 2006-07-20
4
339 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
  • 2
4 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 125 total points
Comment Utility
scalewidth if the width without including the border of your form
0
 
LVL 1

Author Comment

by:FartingUncle
Comment Utility
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
Comment Utility
yes
0
 
LVL 1

Author Comment

by:FartingUncle
Comment Utility
Good - Thank you.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now