Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check the current screen resolution?
Message
From
29/11/2021 06:43:07
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01682835
Message ID:
01682841
Views:
56
Did you plan for runtime changes to screen size ? Happens in my surroundings (VirtualBox hosting the "system") sometimes even by mis-clicking. Even on more traditional HW leaning settings it could happen: switching monitor, going from lap screen to office etc.., Might be better to look for WinAPI + Eventbinding than adding a new timer or a check branch to existing timer...

my 0.00022€
thomas

>>Hi,
>>
>>I have a window/form which is only works on a larger monitors. So, in order to show this window/form on a small monitor, I need to reduce it (at run-time). Is there a way to find out the current screen/monitor resolution so that I can make the height of the window smaller?
>>
>>TIA
>
>The sysmetric(2) that Dragan suggested shows exactly the height of the monitor I have now. Which is what I am looking for.
>
>Now I am trying to figure out the cut-off point of the resolution (on a customer's PC) to make the window/form smaller. The window/form I have is 680 pixels (at design and run time without making any change).
>What do you suggest I should look for (in sysmetric(2)) to start reducing the height of the window/form?
>
>UPDATE. I found how to make this work. I can change the resolution on my PC and then see if the form completely appears. It looks like 960 is the cut-off point. That is, if the screen is smaller than 960, I need to reduce the height of the form.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform