BeforeModifyView

ControlBox

This property determines whether forms and toolbars have a control menu available in the upper left corner.

Usage

oObject.ControlBox = lHasControlMenu lHasControlMenu = oObject.ControlBox
For forms (and _SCREEN), the contents of the control menu, if it's there, are determined by other properties. MaxButton and MinButton control the Maximize and Minimize items, respectively. Movable controls the Move item. Closable controls the Close item. BorderStyle, of all things, controls the Size item—sizing is available only when BorderStyle=3.

Setting ControlBox to .F. also disables the Minimize, Maximize and Close buttons on the title bar.

The TitleBar property, added in VFP 6, overrides the setting of ControlBox. If TitleBar is 0, there's no control menu or any of the other stuff that normally resides on the title bar—that's because there's no title bar.

For toolbars, ControlBox determines whether you get a Close button. Before you turn this one off, think hard about it. In most applications, the user should decide whether a particular toolbar is available or not. While we recognize that there are some specialized applications where keeping a toolbar alive is essential, in the average data entry app, it shouldn't be.

Example

_SCREEN.ActiveForm.ControlBox = .F.  && Turn off control menu

See Also

BorderStyle, Closable, MaxButton, MinButton, Movable, TitleBar


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