Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculation for size of VFP Desktop area?
Message
De
15/11/2002 11:20:35
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00723216
Message ID:
00723253
Vues:
12
Not sure what you are looking for here, but I use:

* Set VFP desktop top to half the difference between
* monitor resolution height and _vfp.height
_vfp.Top = (Sysmetric(2) - _vfp.Height)/2
_vfp.Left= (Sysmetric(1) - _vfp.width)/2

to center the desktop regardless of the screen resolution. You also can use:

_vfp.top
_vfp.left
_vfp.height
_vfp.width

to determine the current size and location of the VFP desktop.

>Does anyone have (or know of) a formula/calculation to determine the height and width of the VFP Desktop area. This would be the space below the menu bar (if any) and above the status bar (if turned on).
>
>I know SYSMETRIC() could be used to help calculate this, but I'm not sure of everything to include. I also know that _Screen.Height and _Screen.Width will help, but this is the size of the whole desktop (including title bar, menu bar, status bar, etc.)
>
>REASON: My application allows the users to adjust the height of some forms inside the application. The application saves these sizes and uses them the next time the form is opened. I also do the same for the desktop (_screen). If the user shrinks the desktop to it's minimum size (that I allow) or changes screen resolution (users! ), then the form could extend past the size of the desktop. I want to know what space I have so that I can make the sizing of the form smarter, shrink it automatically when necessary.
>
>Thanks in advance,
>James Jernigan
>Nashville, TN USA
>jrjernigan@hotmail.com
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform