代码如下:(这段代码是写在菜单的过程当中的,我是想通过执行菜单实现实时的主窗品背景更换)
CLEAR all
CLOSE ALL
tp11=RAND(-1)
tp12=ROUND(tp11*70,0)
tp13=ALLTRIM(STR(tp12))+".jpg"
_screen.AddObject('Image1','Image')
with _screen.Image1
.width = _screen.width
.height = _screen.height
.visible = .t.
.stretch = 2
.anchor = 15
.picture='&tp13'
endwith