Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reduce/Enlarge windows isometrically
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00039056
Message ID:
00039177
Vues:
30
>>In form's RESIZE method:
>>
>>*
>>* Below, you have to decide which change takes precedent -
>>* the height or width. Move the second case statement and its contents
>>* before "case ThisForm.Height" if you want the opposite precedence.
>>*
>>do case
>> case ThisForm.Height ThisForm.LastHeight
>> * keep the current height, but adjust the width
>> ThisForm.Width = ThisForm.Height/nRatio
>> case ThisForm.Width ThisForm.LastWidth
>> * keep the current width, but adjust the height
>> ThisForm.Height = nRatio * ThisForm.Width
>>endcase
>>
>>That's all it should take.
>Mark,
>
>One more thing needs to be done in this code, after the ENDCASE you would need;
>
> THISFORM.LastHeight = THISFORM.Height
> THISFORM.LastWidth = THISFORM.Width
>
>or else the next resize won't work right

Sorry, I forgot to mention that I suggest adding the form property of nRatio and setting it in the form' INIT to the original ThisForm.Height/ThisForm.Width ratio.

INIT method:

ThisForm.nRatio = ThisForm.Height/ThisForm.Width

This eliminates the need to have the other 2 form properties. I suggested this because I finally realized that the ratio would never change regardless of the height or width. Then in the resize method all you need is the ThisForm.nRatio value.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform