Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running code after a resize
Message
 
 
To
26/02/2002 14:32:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00625168
Message ID:
00625430
Views:
13
Matt,

Warning untested code off the top of my head *s*

In the Resize try this then:
if ( thisform.tmrResize.Enabled )
   * timer is already running, bump the timer back out
   thisform.tmrResize.Interval = 1000
else
   * start the timer
   thisform.tmrResize.Enabled = .t.
endif
In the tmrResize.Timer() event:
if ( mdown() )
   * mouse still down rearm the timer
   this.Interval = 1000
else
   * they are really done resizing
   this.Enabled = .f.
   thisform.RepositionEverything()
endif
Now 1 second after they are done resizing the form it'll redraw. This does have a failure mode that if they are holding the mouse down on some other control it won't resize until they let the mouse up so you might want to use 100 or 200 msec on the timer.

>I don't believe that the option of placing that code on the Resize will work because when a form is being resized the mouse has to be down (because the user has to be dragging it to resize it). Therefore the code will never execute, so I believe a timer is necessary.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform