Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get Screen Dimensions
Message
From
10/02/2000 05:19:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/02/2000 04:54:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00329897
Message ID:
00329899
Views:
25
>Never mind I found it??
>Sysmetric(1)
>Sysmetric(2)


No, unfortunately you couldn't :( I also thought they were returning correct values but they don't. Try this (win2000 RC2, vfp6 sp3, S3 trio3d2x AGP - probably related with my video card and might not happen there) :
-Set screen resolution to something like 1280*1024 or 1024*768
-Launch VFP, maximize
-Go to desktop, change resolution to 800*600
-Launch "another" VFP and maximize
-Go to desktop, change resolution back to 1280*1024
-Go to 2nd VFP session - It's in 800*600 area maximized ! Restore and maximize think screen is 800*600 so do sysmetric()

I got this code from George Tasker (thanks George) and returns correct results :
#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_CXSCREEN)
? GetSystemMetrics(SM_CYSCREEN)
? GetSystemMetrics(SM_CXFULLSCREEN)
? GetSystemMetrics(SM_CYFULLSCREEN)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform