MoveSize Twips Limit?

V

vek

Access 2007, using MoveSize to position a Popup form. Works properly until
the value of one of the Variants (in this case varLeft) exceeds 31,680 twips.
I suspected that this was due to an Integer limit of approx. 32000. However,
I have loaded the Variant value with both LongInteger (vartype 3) and Double
(varType 5) and get the same overflow error. The MoveSize works correctly on
all values below 31,680.
 
D

Douglas J. Steele

It doesn't matter what variable type you're passing to the MoveSize method:
the parameters of the method are integers.

You do realize that 31680 twips is 22 inches?
 
V

vek

Thanks for the comment. Using dual large monitors it is quite easy to require
a form to have a left edge greater than 22 inches.

To reiterate: the MoveSize method works properly until the twips exceed the
value of integer limits. Is it possible for the method to recognize
longInteger or is it possible to use another way to get the twip value to a
higher number?

Thanks again.
 
J

John W. Vinson

Is it possible for the method to recognize
longInteger or is it possible to use another way to get the twip value to a
higher number?

By having Microsoft completely redesign how Access (and probably several other
Office apps) interact with the screen... in other words, don't hold your
breath!
 
M

Mike Painter

John said:
By having Microsoft completely redesign how Access (and probably
several other Office apps) interact with the screen... in other
words, don't hold your breath!

But most apps already will span well over 20 inches.
Even the subject line in OE will span over 29 inches if you hover over it.
 
K

Klaus-Dieter Gundermann

Access 2007, using MoveSize to position a Popup form. Works properly until
the value of one of the Variants (in this case varLeft) exceeds 31,680 twips.
I suspected that this was due to an Integer limit of approx. 32000. However,
I have loaded the Variant value with both LongInteger (vartype 3) and Double
(varType 5) and get the same overflow error. The MoveSize works correctly on
all values below 31,680.
Confirmed for Access 2010 !!!

The same limit, no hint in the helpfile
 
M

Mike Painter

Klaus-Dieter Gundermann said:
Confirmed for Access 2010 !!!

The same limit, no hint in the helpfile

How about the max size for combo boxes. It seems to have about a 64 k
limit.?
 
D

Douglas J. Steele

Mike Painter said:
How about the max size for combo boxes. It seems to have about a 64 k
limit.?

It's the total number of positions that can be represented in 4 bytes (an
Integer field). I'd be surprised if that's changed.
 
T

Tony Toews [MVP]

Douglas J. Steele said:
It's the total number of positions that can be represented in 4 bytes (an
Integer field). I'd be surprised if that's changed.

2 bytes.

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top