带底图的MDI窗口
1.新建菜单m_main
2.新建窗口w_pic,添加图片控件
3.新建主窗口w_main,添加菜单m_main,WindowType选择mdihelp!
4.w_pic窗口定义实例变量
boolean isFullScreen
integer oldwidth,oldheight
5.w_pic窗口的open()事件
isfullscreen = true
oldheight = p_1.height
oldwidth = p_1.width
6.w_pic窗口的resize()事件
p_1.setredraw(false)
if isFullScreen then
p_1.x = 0
p_1.y = 0
p_1.resize(newwidth,newheight)
else
p_1.resize(oldwidth,oldheight)
integer ax,ay
ax = (newwidth - oldwidth) / 2
if ax < 0 then ax = 0
ay = (newheight - oldheight) / 2
if ay < 0 then ay = 0
p_1.x = ax
p_1.y = ay
end if
p_1.setredraw(true)
7.w_pic创建函数init(string as_picture,boolean as_isfullscreen)
p_1.OriginalSize = true
p_1.pictureName = as_picture
oldheight = p_1.height
oldwidth = p_1.width