Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object position to the SCREEN.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00304789
Message ID:
00305024
Vues:
36
>>I wrote a small form to accept date & time via a calendar control & spinners.
>>
>>I want to be able to "do form frmTimeDate with oObject, n"
>>
>>where n is a # representing where the form should appear (top, left, bottom, right) of the object.
>>
>>oObject.left and oObject.top are in releation to the FORM they apper on; but a forms .left and .top are in relation to the screen.
>>
>>How can I get object's position in relation to the screen?
>>
>>The only thing I figured out was to get the ojbect's form's LEFT/TOP properties and add that to the objects left/top properites.
>>
>>Is that the best way?
>>
>>Thanks
>
>Hi Josh,
>
>The top and left coordinator of an object on a form do not include either the title bar for the top, or the width of the frame. You need to adjust accordingly. You can get these values using the SYSMETRIC() function, passing the appropriate parameters and making the calculations yourself. Also, you might want to look at the OBJTOCLIENT() function if the object is part of a container.

I believe it does not include the toolbars, too.

Vlad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform