I wrote an app (designed in 800 x 600) and distributed it with the following code given to me by Microsoft. This code was supposed to adapt to any setting the user had chosen...640 x 480, 1024 x 768 etc. IT DOESN'T. Any help would be appreciated.
local lnheight, lnwidth, lnheightdiff, lnwidthdiff
lnheight=640
lnwidth=480
lnheightdiff=0
lnwidthdiff=0
if sysmetric(1)<>lnheight
lnheightdiff=sysmetric(1)/lnheight
lnwidthdiff=sysmetric(2)/lnwidth
this.height=this.height * lnheightdiff
this.width=this.width * lnwidthdiff
this.top=this.top * lnheightdiff
this.left=this.left * lnwidthdiff
for i = 1 to this.controlcount
with this.controls(i)
.height = .height * lnheightdiff
.width=.width*lnwidthdiff
.top=.top*lnheightdiff
.left=.left*lnwidthdiff
endwith
endfor
endif
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson