登录注册
上海交通大学论坛 > 数据库 > 浏览当前帖子 手机版 关闭左侧栏
PB怎么使工作表在主窗口中居中打开?
返回本版】  【发表帖子】  【回复帖子 浏览量  5856      回帖数 0
小萧    等级  

楼主 发表于  2012/1/7 18:14:35    编 辑   


我在窗口的open里加入这么一段: 

Window w_parent 

w_parent = This.ParentWindow() 

If Not IsNull(w_parent) Then 
    If w_parent.WIndowType = MDIHelp! Then 
        This.X = (w_parent.WorkSpaceWidth() - This.Width)/2 
        This.Y =  (w_parent.WorkSpaceHeight() -  & 
                    w_main.mdi_1.MicroHelpHeight - This.Height)/2  
    Elseif w_parent.WIndowType = MDIHelp! Then 
        This.X =  (w_parent.WorkSpaceWidth() - This.Width)/2 
        This.Y = (w_parent.WorkSpaceHeight() - This.Height)/2         
    End If 
End If 

测试结果不完全正确。 哪位高手能指点一二? 
还有,怎么取得父窗口的MicroHelp栏高度? 我用的是笨办法(w_main.mdi_1.MicroHelpHeight) 
w_main就是w_parent, 我想不用w_main, 可是没有实现。 原因是对Window对象和MDIClient的关系 
还有些模糊。  
1
表情
所有内容均为会员自愿发表,并不代表本站立场.
论坛帮助 会员认证删帖申请 联系我们