Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you calculate the header height?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00290365
Message ID:
00290392
Vues:
31
Hi Dan,

Look at sysmetric(3) and sysmetric(4) as well. they tell you the border width of the form. Also 10 and 11 (for non-sizeble borders).

Sysmetric(9) tells you the height windows sets for a window title. I doesn't change if you don't have a title, it's just the default setting for all window titles. I put the following in a button and it lines a form up perfectly next to the button.

x = newobject('form')
x.titlebar = 0
x.top = this.top + thisform.top + sysmetric(9) + sysmetric(4)
x.left = this.left + this.width + thisform.left + sysmetric(3)
x.show

hth.

BTW Mike, thanks for the lead-in to sysmetric(9). I hadn't used it before.

>>Hi Dan,
>>
>>>Sorry. The form's header height.
>>
>>SysMetric(9)?
>>
>>>Each control is positioned relative to the header of the form.
>>
>>I don't understand this either, is it some spec to a project your working on? A controls Top is relative to the bottom of the TitleBar ('header'), so I don't follow. Sorry.
>
>We've got a calendar control which we have added to a form. Our main form has a button when pushed will call this calendar form and we want to position the form right next to the button. We used objtoclient to get the top position of the button but since the top position is relative to the header height of the form, we were off by that much.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform