Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you calculate the header height?
Message
From
11/11/1999 20:08:06
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00290365
Message ID:
00290408
Views:
54
>>Actually, I just turned the titlebar off in design mode, added a command button on the form and in the click event I have the code
>>
>>WAIT WINDOW STR( SYSMETRIC( 9 ) ) NOWAIT
>>
>>I added a THISFORM.TitleBar = 0
>>
>>And still this always returns 24.
>
>AFAIK it will always return the OS system setting for a title bar height. It's not returning the height of the titlebar on a form. It the setting that VFP looks at to determine the height of a titlebar should be.
>
>Did the code not work? It worked fine for me.

No. The called form is always in the same position but the calling form shifts up when the title bar disappears.

Here's the code in form a's command button click event
IF THIS.Caption = "NOTITLE"
   THISFORM.TitleBar = 0
   THIS.Caption = "TITLE"
ELSE
   THISFORM.TitleBar = 1
   THIS.Caption = "NOTITLE"
ENDIF

DO FORM B NOSHOW NAME oForm
oForm.Top = THIS.Top + THISFORM.Top + SYSMETRIC( 19 ) + SYSMETRIC( 4 )
oForm.Left = THIS.Left + THISFORM.Left + THIS.Width + SYSMETRIC( 3 )
oFormShow
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform