Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apps used w/different displays
Message
 
 
À
06/11/2000 15:49:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00438523
Message ID:
00438640
Vues:
10
What does it do that it appears not to work? It looks like this will resize your controls proprotionaltely to the screen size.

However this is only part of the problem when resizing. You also need to take into account changes in fontsize as well. An application that looks good at 640x480 may be totally unreadable at 1024x768.

>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
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform