Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to get screen height * width ?
Message
From
29/12/1999 07:42:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00309284
Message ID:
00309761
Views:
58
>>>>With native VFP. I prefer not to use WinAPI. TIA.
>>>
>>>Cetin,
>>>
>>>I know you well enough to know you're probably not asking for the size in pixels, but the physical dimensions (in meters I assume) of the monitor. That right?
>>
>>
No George :) If I can get the pixels I could get the twips :)
>>Mark I'm a human too :) and being honest just couldn't think sysmetric().
>>Fred and Ed unfortunately I talked too early about sysmetric() being the answer. My sesssion was somehow a normal "maximizable" session. I should reproduce the effect first and I can only do it tomorrow. I'll be back if that doesn't work :)
>>
>>Here a short detail (Just can't remeber exact steps):
>>-A VFP task open (max or norm ? don't remember)
>>-Screen res. from 1280*1024 to 800*600
>>-Anýother VFP task (fox screen max. or norm again can't remember :( )
>>-Restore resol.
>>-Return to first VFP task
>>-Maximize
>>-Maximized state is obviously about 800*600
>>
>
>I'd be willing to bet that the Form's MaxHeight and MaxWidth properties were set to 600 and 800 respectively; you can get around this by writing the returns of SYSMETRIC(1) and SYSMETRIC(2) into the properties if you need to.


Hi,
I'll again CC to all of you because I know you want it for at least info ( don't you :)
I reproduced it and sysmetric() was not the answer (and I'm not sure if there is an answer).
Ed you lost the bet :)
Here is how to reproduce it :
-Screen res : 1280*1024
-Invoke a VFP session (nothing else just VFP) and maximize
-Go to desktop and set res. to 800*600
-Invoke another VFP task - Comes up maximized to 800*600
-Go to desktop and set resolution back to 1280*1024
-Switch to second VFP task
-_screen.maxheight and _screen.maxwidth are both -1 (none set - max possible I think). I didn't touch their settings just checked for the bet :)
-Now sysmetric() show that res is 800*600 (!!!)
-You play with maximize-restore button and VFP just max-restore in place ! Threats the max desktop as 800*600. Sysmetric() also say it's 800*600

But of course other (1st) VFP session knows it's 1280*1024.

I sense that this is not a matter of VFP but Windows itself. I use w2000 built 2128 and you might not be able to reproduce under another version.
George as to your info it maps to WinAPI GetSystemMetrics I think I shouldn't seek further for the moment :)
If anyone has an idea to change it wellcome.
Happy new year to all of you and families.
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