HITSY 版 (精华区)

发信人: lyfe (修身养性), 信区: HITSY
标  题: pb窗体放在屏幕的中央(转载)
发信站: 哈工大紫丁香 (2002年04月06日13:11:38 星期六), 站内信件

【 以下文字转载自 Database 讨论区 】
【 原文由 lqing 所发表 】
environment le_env
int screenheight, screenwidth

/* get screen measurements */

GetEnvironment(le_env)
screenheight = PixelsToUnits(le_env.screenheight,YPixelsToUnits!)
screenwidth = PixelsToUnits(le_env.screenwidth,XPixelsToUnits!)

/* now position window */

aWin.Move( (ScreenWidth - aWin.Width) / 2, (ScreenHeight - aWin.Height) / 2 )

--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: hpwei.hit.edu.cn]
--
※ 转载:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: 202.118.226.245]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.628毫秒