Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Let user resize a form
Message
From
26/06/2014 08:30:18
 
 
To
25/06/2014 16:46:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows NT
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01602502
Message ID:
01602571
Views:
58
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform