VFP根据分辩率调整表单

来源:百度文库 编辑:神马文学网 时间:2024/04/19 02:40:18
VFP根据分辩率调整表单
[ 2005-10-13 10:18:23 | 作者:花狐狸 ]
:||
表单的Init:
local InHeight ,InWidth,InHeightDiff,InWidthDiff
YH=480
YW=640
HBL=0
WBL=0
if sysmetric(2)<>YH
HBL=sysmetric(2)/YH
WBL=sysmetric(1)/YW
this.height=this.height*HBL
this.width=this.width*WBL
this.top=this.top*HBL
this.left=this.left*WBL
for i=1 to this.controlcount
with this.controls(i).height=height*HBL
width......
if type("fontsize")<>"U"
fontsize=fontsize*((5*WBL)+(5*HBL))
endif
endwith
endfor
endif
thisform.refresh