下例演示了如何用_screen 命令来指定 visual foxpro window 主窗口的属性。
* 保存现设置的变量
local oldscreenleft
local oldscreentop
local oldscreenheight
local oldscreenwidth
local oldscreencolor
with _screen
oldscreenleft=.left &&
保存当前位置和大小
oldscreentop=.top
oldscreenheight=.height
oldscreenwidth=.width
oldscreencolor = .backcolor
.lockscreen=.t. &&
禁止屏幕重绘
.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