当前位置: 代码迷 >> PB >> 求教MDI窗口背景图片RESIZE?解决方法
  详细解决方案

求教MDI窗口背景图片RESIZE?解决方法

热度:411   发布时间:2016-04-29 10:37:46.0
求教MDI窗口背景图片RESIZE?
做一个MID窗口w_main
放了三个文本控件以便显示信息。
w_main的resize事件:

mdi_1.X = 1
mdi_1.Y = 1
mdi_1.Width = NewWidth - 2 * mdi_1.X
mdi_1.Height = NewHeight - mdi_1.Y - st_1.Height - 3

st_1.X = 1
st_1.Y = NewHeight - st_1.Height - 2
st_1.Width = (NewWidth - 2 * st_1.X - 4) / 3

st_2.X = st_1.X + st_1.Width + 2
st_2.Y = st_1.Y
st_2.Width = st_1.Width

st_3.X = st_2.X + st_2.Width + 2
st_3.Y = st_1.Y
st_3.Width = st_1.Width

w_main新建ue_open

String ls_rtn
Window lw_temp

OpenSheet(lw_temp,'w_back',this,-1,Layered!)  

ii_count = 2
Open(w_login)

ls_rtn = Message.StringParm
if ls_rtn <> 'suc' then halt Close

st_2.Text = '当前操作员:' + gs_username

w_main的OPEN事件

st_3.Text = '当前时间:' + String(today(),'yyyy年mm月dd日') &
+ ' ' + String(Now(),'hh时mm分ss秒')
Timer(1)

This.PostEvent('ue_open')


w_main中的TIMER事件
st_3.Text = '当前时间:' + String(today(),'yyyy年mm月dd日') &
+ ' ' + String(Now(),'hh时mm分ss秒')

ii_count = ii_count - 1
if ii_count = 0 then close(w_splash)

背景窗口W_back 只放了一个图片控件,图片控件取消了Originsize属性,且W_back窗体取消Eablen属性

,设置为Popup类型,取消TiterBar,状态设为最大化。
W_back中的open事件:
p_1.PictureName = gs_path + '\Images\back.bmp'

w_back中的Resize事件:
p_1.x = 0
p_1.y = 0
p_1.resize(newwidth,newheight)

可怎么试背景图片都无法随着MDI窗体改变图片尺寸,不知道什么原因?
我用的是Powerbuilder 11.5 Build 2506版。
弄了好几天了,都不知道怎么回事,非常感谢!



------解决方案--------------------
你试了吗?我已试过了,因为你的w_back窗口状态设为最大化了。
------解决方案--------------------



pb 带有底图片的MDI界面 http://download.csdn.net/source/2599214
  相关解决方案