How to determine Windows Zoom level when using multiple monitors with different settings in WordVBA?
I have 3 displays: My laptop, and 2 standalone monitors. Because my laptop is only 13” I set its Window’s (not Word’s) zoom level to 125% under the Windows display settings. The other 2 are at 100%
I have created a UserForm the I show modelessly. It contains a ListBox (and, of course, other controls).
Because of the different display percentages I cannot have the Userform or ListBox be as tall on the laptop as on the other 2 monitors.
I want to know the zoom level of the display the Userform is currently in so I can adjust the size of the Userform and size and positioning of all of the UserForm’s elements accordingly. (Since I often drag the Userform to one or the other display depending on what else I happen to have open.)
I’ve searched, and tried, many so-called solutions all over the web, but I have not found any that returns the correct Zoom level for whichever monitor contains the Word active document, let alone for the monitor the Userform is in.
BTW, the “solutions” I have tried involve both low level code and pure VBA code. While I can use them to get the resolution, and pixels, etc., and even the primary monitor’s zoom level, I haven’t found any that returns the laptop’s Windows’ (not Word’s) zoom level (again, while that would be a first step, my ultimate goal is to know the Windows’ display zoom setting for the monitor my UserForm is currently in).
Can anyone help?
|