文档介绍:根据显示器分辨率设置窗口显示位置
Written by
参数:
w_1 窗口变量
作用:
依据显示器辨别率设置窗口显示位置
调用方法:
在窗口的Open大事
根据显示器分辨率设置窗口显示位置
Written by
参数:
w_1 窗口变量
作用:
依据显示器辨别率设置窗口显示位置
调用方法:
在窗口的Open大事中,输入代码change_systemmetrics(this),
假如窗口是继承的,请留意调用的位置。(在父窗口的open调用
可能失效)
-----------------------------------------------------*/
integer li_1024bc = 50 /*1024辨别率下的编差值*/
integer li_800bc = 50 /*800辨别率下的编差值*/
Integer li_WS_Width /*工作区宽度*/
Integer li_WS_Height /*工作区高度*/
Integer li_my_Width /*当前窗口宽度*/
Integer li_my_Height /*当前窗口高度*/
integer li_system_metrics /*系统辨别率*/
/*w_main是MDI中的主窗口,这里取得其客户显示区的大小(做了适当调整)*/
li_WS_Width = () -8
li_WS_Height = () - -8
li_my_Width =
li_my_Height =
li_system_metrics = getsystemmetrics(0) /*取系统辨别率 */
choose case li_system_metrics
case 640 /* 640×480 下全部窗口有化*/
= maximized!
case 800 /* 800×600*/
if li_my_Width + li_800bc >= li_WS_Width or li_my_Height + li_800bc >= li_WS_Height then
= maximized!
else