R
Robert Morley
Hi everyone,
I have an Access form which I'm dynamically sizing based on the number of
entries in a list box. Simple code to dynamically re-center it doesn't
quite seem to be working as I would expect (AutoCenter is on, then simply
move form up by half the difference of height change). I realize that
algorithm won't be perfect, due to things like title bar height, but I
would've thought it would be close enough. Instead, with large numbers of
entries in the list box, my form goes WAY above the top of the Access "work
area" (i.e., the usable display area after title bars, etc.). I verified
the math, and that seems to be alright, which leads me to believe that
Access' idea of vertically centered...isn't.
As a stop-gap measure, I simply limited the Top to non-negative numbers, but
that doesn't address the actual issue, and looks a little odd besides.
Does anybody have, or know of, any code that will dynamically re-center a
form within Access' work area? I can probably manage to figure it out
myself, possibly resorting to API calls, but it would certainly be a PITA.
I'm sure SOMEBODY must have written code like this before, but my attempts
at googling it didn't turn up anything useful.
Thanks all,
Rob
I have an Access form which I'm dynamically sizing based on the number of
entries in a list box. Simple code to dynamically re-center it doesn't
quite seem to be working as I would expect (AutoCenter is on, then simply
move form up by half the difference of height change). I realize that
algorithm won't be perfect, due to things like title bar height, but I
would've thought it would be close enough. Instead, with large numbers of
entries in the list box, my form goes WAY above the top of the Access "work
area" (i.e., the usable display area after title bars, etc.). I verified
the math, and that seems to be alright, which leads me to believe that
Access' idea of vertically centered...isn't.
As a stop-gap measure, I simply limited the Top to non-negative numbers, but
that doesn't address the actual issue, and looks a little odd besides.
Does anybody have, or know of, any code that will dynamically re-center a
form within Access' work area? I can probably manage to figure it out
myself, possibly resorting to API calls, but it would certainly be a PITA.
I'm sure SOMEBODY must have written code like this before, but my attempts
at googling it didn't turn up anything useful.
Thanks all,
Rob