Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apps used w/different displays
Message
De
06/11/2000 15:49:02
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Apps used w/different displays
Divers
Thread ID:
00438523
Message ID:
00438523
Vues:
42
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform