DMY()

TitleBar

This property, added in VFP 6, makes creating a form without a title bar a whole lot easier.

Usage

oForm.TitleBar = nHasTitleBar nHasTitleBar = oForm.TitleBar

Parameter

Value

Meaning

nHasTitleBar

0

The form has no title bar.

1

The form has a title bar.


Before this property was added, removing the title bar from a form (say, to create a splash screen) was a pain. You had to set a whole bunch of properties. (See BorderStyle for the whole list.) Now you need just one, and all the others don't matter.

This property is another case of a C influence on VFP. There's no reason on earth why this property should be numeric. There are only two possible values. Unless, of course, the designers are thinking of giving us other choices here, like, say, title bars at the bottom or on the sides.


What we want to use this property for most is creating splash screens. Unfortunately, a bug means we can't create a generalized splash screen class. When a form class has TitleBar set to 0 and ShowWindow set to 2 ("as top-level form"), forms instantiated from that class have a title bar anyway. (VFP 5 has the same bug, except that to see it, you have to set that whole collection of properties that give a form without a title bar.)

Oddly, forms (the DO FORM kind) created with TitleBar = 0 and ShowWindow = 2 work just fine.


Example

* Check whether the active window has a title bar IF _SCREEN.ActiveForm.TitleBar = 1    _SCREEN.ActiveForm.Caption = "April Fool!" ENDIF

See Also

BorderStyle, Caption, Closable, ControlBox, MaxButton, MinButton, Movable, ShowWindow


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net