Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to get screen height * width ?
Message
 
To
29/12/1999 09:45:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00309284
Message ID:
00309838
Views:
65
Hi George,
>It returns 1280*996 with one line taskbar and 1280*972 with 2 lines taskbar. As to my understanding it does report taskbar area subtracted. Well I take my word back about WinAPI :) This is valuable routine for me, thanks :)

Hi Cetin,

First, you're welcome

Yep, it does provided that the user (like me) doesn't have the Auto Hide option checked on the task bar properties. And it's time for another retraction< g >. I inadvertantly chose the wrong parameters for GetSystemMetrics() when I tested. So without further ado (and not ADO< g >), here's the right information.
#define SM_CXSCREEN             0 && Screen width in pixels
#define SM_CYSCREEN             1 && Screen height in pixels
#define SM_CXFULLSCREEN         16 && Client area width
#define SM_CYFULLSCREEN         17 && Client area height
DECLARE INTEGER GetSystemMetrics IN Win32API;
  INTEGER nIndex
* Example
? GetSystemMetrics(SM_CYSCREEN)
There's no difference between SM_CXSCREEN and SM_CXFULLSCREEN in the main VFP window. The differences between SM_CYSCREEN and SM_CYFULLSCREEN are these:

SM_CYSCREEN is the full height of the screen in pixels.

SM_CYFULLSCREEN is height of the screen not including the task bar (if showing) nor the VFP status bar.

Hope that clears this up.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform