1 / 3
文档名称:

根据显示器分辨率设置窗口显示位置.docx

格式:docx   大小:12KB   页数:3页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

根据显示器分辨率设置窗口显示位置.docx

上传人:老狐狸 2022/7/1 文件大小:12 KB

下载得到文件列表

根据显示器分辨率设置窗口显示位置.docx

文档介绍

文档介绍:根据显示器分辨率设置窗口显示位置
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