Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Let user resize a form
Message
 
 
À
25/06/2014 16:46:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows NT
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01602502
Message ID:
01602571
Vues:
57
>Anybody can share some code on how to let a user resize a form and keep the new dimension.
>
>I know that there is the resize event but it looks like it's not really what I need. I mean I put a messagebox in that event and as soon as I resize the window the event pops up the message immediately. I want to be able to save the information about new dimension of the screen after the resizing is finished.
>
>Any code you can share?

If you want to save the new dimensions right after resizing (say you would open another instance of the same form before closing this form, and the new form should already recognize the form's new dimensions without closing it first), then you can use a timer on the form that triggers the saving method.
The key is that in the Resize event you reset and enable the timer. Once the resize event is finished, the timer finally gets fired, disables itself and triggers the save dimensions event.
The timer should be initially Enabled = .F. and Interval = 1000.
In the timer method you put
THIS.Enabled = .F.
THISFORM.SaveDimensions()
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform