Specifies properties and methods for the main Visual FoxPro window. You can use _SCREEN to manipulate the main Visual FoxPro window as an object. There are two versions of the syntax.
|
|---|
_SCREEN.PropertyName [= eValue] |
Parameters
-
PropertyName
-
Specifies a property for the main Visual FoxPro window.
-
eValue
-
Specifies a value for the property.
-
MethodName
-
Specifies a method to execute for the main Visual FoxPro window.
Remarks
Examples
The following example demonstrates the use of _SCREEN to customize the main Visual FoxPro window. The following lines of code declare local variables for storing the current settings:
| | Copy Code |
|---|
Local oldScreenLeft
Local oldScreenTop
Local oldScreenHeight
Local oldScreenWidth
Local oldScreenColor |
The following code saves the current settings of the main Visual FoxPro window:
| | Copy Code |
|---|
WITH _SCREEN
oldScreenLeft=.Left
oldScreenTop=.Top
oldScreenHeight=.Height
oldScreenWidth=.Width
oldScreenColor = .Backcolor |
The following codes disable redrawing of the window, change the background color to grey, changes the border style, sets properties for the window's control buttons, makes the window movable at run time, specifies the height and width of the window, sets a caption for the window, and enables redrawing of the screen:
| | Copy Code |
|---|
.LockScreen=.T.
.BackColor=rgb(192,192,192)
.BorderStyle=2
.Closable=.F.
.ControlBox=.F.
.MaxButton=.F.
.MinButton=.T.
.Movable=.T.
.Height=285
.Width=550
.Caption="Custom Screen"
.LockScreen=.F.
ENDWITH
=MESSAGEBOX("Return to normal ",48,WTITLE()) |
The following code sets the properties of the window to its original settings:
| | Copy Code |
|---|
WITH _SCREEN
.Left = oldScreenLeft
.Top = oldScreenTop
.Height = oldScreenHeight
.Width = oldScreenWidth
.BackColor=oldScreenColor
.LockScreen=.T.
.BorderStyle=3
.Closable=.T.
.ControlBox=.T.
.MaxButton=.T.
.MinButton=.T.
.Movable=.T.
.Caption="Microsoft Visual FoxPro"
.LockScreen=.F.
ENDWITH |
See Also