Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running code after a resize
Message
 
 
To
27/02/2002 09:23:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00625168
Message ID:
00625876
Views:
11
Matt,

Ok after getting a chance to test this, you need a different kind of oneshot here. The timer.event() is not being called while you are holding the mouse down. Which means that all of the events queue up and then fire once you release the mouse button.

This code works the way you want:

Form.Resize:
this.tmrResize.Enabled = .t.
this.lBeingResized = .t.
tmrResize.Timer:
if ( thisform.lBeingResized )
   this.Enabled = .f.
   thisform.lBeingResized = .f.
   thisform.RepositionEverything()
endif
I have to ask again if you really want to be doing this.. If the user has set the "Show Window Contents While Dragging" flag at the OS level they are expecting the windows to continually readjust themselves while they are resizing the window. So by doing the code we are discussing here you are violating the Windows UI Guidelines. If the user doesn't want this behavior, like myself, they simply turn off the setting from the Desktop properties page.

>Just looked at another post that suggested checking to see if the timer was enabled before firing my code, and it worked. apparently, the timer caches events and only fires them after the resize.
df (was a 10 time MVP)

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

Click here to load this message in the networking platform