Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to get screen height * width ?
Message
De
29/12/1999 08:25:39
 
 
À
29/12/1999 07:42:44
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00309284
Message ID:
00309773
Vues:
39
>>>>>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 :)

VFP does a static read of certain environmental registry values into system variables on startup - you may need to force a refresh. This a is a SWAG, but you might try issuing a SYS(3056) to force a re-read of environmental veriable settings from the registry; I haven't tried it.

>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
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform