P
PatFinegan
I set the StartupPosition of a UserForm to manual and wish to place it,
for example, in the lower right corner of the screen.
I use the API GetSystemMetrics function to return a screen width and
height, but then have to scale those measures down before subtracting
the width and height of the UserForm itself (to 60% for my 1400 x 1050
screen and 75% for my 1024 x 768 screen).
In other words, the screen width for UserForm placement purposes is
only 840 x 630 for a 1400 x 1050 screen and only 768 x 576 for a 1024 x
768 screen.
Question: Is there a way to determine this "scaling" factor
dynamically, so that the application always places the form where I
want it, regardless of the user's screen resolution?
I am sure this has been addressed many times, but my searches came up
empty. Any direction on this would be greatly appreciated. Thanks in
advance.
for example, in the lower right corner of the screen.
I use the API GetSystemMetrics function to return a screen width and
height, but then have to scale those measures down before subtracting
the width and height of the UserForm itself (to 60% for my 1400 x 1050
screen and 75% for my 1024 x 768 screen).
In other words, the screen width for UserForm placement purposes is
only 840 x 630 for a 1400 x 1050 screen and only 768 x 576 for a 1024 x
768 screen.
Question: Is there a way to determine this "scaling" factor
dynamically, so that the application always places the form where I
want it, regardless of the user's screen resolution?
I am sure this has been addressed many times, but my searches came up
empty. Any direction on this would be greatly appreciated. Thanks in
advance.
