Condividi tramite


_SCREEN System Variable Properties, Methods and Events

Properties

ActiveControl ActiveForm AlwaysOnBottom
AlwaysOnTop Application AutoCenter
BackColor BaseClass BorderStyle
BufferMode Caption Class
ClassLibrary ClipControls Closable
Comment ControlBox ControlCount
Controls CurrentX CurrentY
DataSession DataSessionID DefOLELCID Property
Desktop DrawMode DrawStyle
DrawWidth Enabled FillColor
FillStyle FontBold FontItalic
FontName FontOutline FontShadow
FontSize FontStrikeThru FontUnderline
Forecolor FormCount Forms
HalfHeightCaption Height HelpContextID
Icon KeyPreview Left
LockScreen MaxButton MaxHeight
MaxLeft MaxTop MaxWidth
MDIForm MinButton MinHeight
MinWidth MousePointer Movable
Name ParentClass Picture
ReleaseType RightToLeft ScaleMode
ShowTips TabIndex TabStop
Tag Top Visible
Width WindowState WindowType

Methods

AddObject AddProperty Box
Circle Cls Draw
Hide Line Move
Point Print Pset
Refresh Release RemoveObject
SaveAs SaveAsClass SetAll
Show TextHeight TextWidth
ZOrder    

Example

The following example demonstrates the use of _SCREEN to customize the main Visual FoxPro window.

* Local variables to store current settings
Local oldScreenLeft
Local oldScreenTop
Local oldScreenHeight
Local oldScreenWidth
Local oldScreenColor
WITH _Screen
 oldScreenLeft=.Left       && Save current position and size
 oldScreenTop=.Top
 oldScreenHeight=.Height
 oldScreenWidth=.Width
 oldScreenColor = .Backcolor
 .LockScreen=.T.       && Disable screen redraw
 .BackColor=rgb(192,192,192)   && Change the background to grey
 .BorderStyle=2        && Change the border to double
 .Closable=.F.         && Remove window control buttons
 .ControlBox=.F.
 .MaxButton=.F.
 .MinButton=.T.
 .Movable=.T.
 .Height=285
 .Width=550
 .Caption="Custom Screen"    && Set a caption
 .LockScreen=.F.       && Enable screen redraw
ENDWITH
=MESSAGEBOX("Return to normal  ",48,WTITLE())
With _Screen
 .Left = oldScreenLeft     && Reset original 
 .Top = oldScreenTop       && position and size
 .Height = oldScreenHeight
 .Width  = oldScreenWidth
 .BackColor=oldScreenColor     && Change background to white
 .LockScreen=.T.       && Disable screen redraw
 .BorderStyle=3        && Change border to sizeable
 .Closable=.T.         && Reset window control buttons
 .ControlBox=.T.
 .MaxButton=.T.
 .MinButton=.T.
 .Movable=.T.
 .Caption="Microsoft Visual FoxPro"  && Reset the caption
 .LockScreen=.F.       && Enable screen redraw
Endwith

See Also

_SCREEN System Variable | MODIFY WINDOW | Form Object | Objects Collection