Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Screen and Forms Width
Message
 
À
17/07/1998 19:33:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00118747
Message ID:
00119094
Vues:
23
How and where are you defining your constant? If you're using an include file, make sure you include it in the same procedure your using it (the init event for example). If your using a variable, make sure it's defined in the same method that it's used in as well. Unless declared public (a bad thing to do), a variable only exists for the life of the method it's in, then it's released.

>>Assuming your doing something similar to the example below, it should work fine. Is the problem with the location of the code(Perhaps it's not being run)? Is your variable defined properly, and in scope?
>>
>>
>>nScreenWidth = sysmetric(1)
>>thisform.width = nScreenWidth
>>
>
>I used a memvar, but the main problem is this:
>
>In the form designer, in properties you have Witdh, and there
>you can't put a memvar or constant. You have to put a number (
>(10,120,640 etc) so I'm forced to put 640.
>
>In the Activate Event I put:
>
>ThisForm.Width=MyWidth (memvar or constant)
>
>Suppose MyWidth is 800. I also tried in the Init Event.
>
>When I run the form: The Width is still 640.
>
>I can't change it to 800 unles I put 800 in
>the Width Property of the form.
>
>So the width is always constant and I can't change it
>dependign of sysmetric().
>
>Any suggestions.
>
>Thanks for your help and time.
>
>Francisco
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform