Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resize keeps firing before releasing mouse button
Message
From
02/11/2003 12:18:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
02/11/2003 12:10:30
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00845310
Message ID:
00845447
Views:
22
>>>Hi Hilmar,
>>>That sounds like my problem. I can't find anything about it in Windows. Any chance you know precisely where it is?
>>
>>Note also that for a widely distributed program, you simply can't trust that events like Refresh() or Paint() fire only when the mouse button is released. You may have to adjust your program for this situation.
>
>Yeah, I kinda figured that out. Does screw around with every Resize class I've ever seen. They all say to put something into the form.Resize(), but that doesn't look like a good idea any more.
>
>Don't supposed you know of a way to test for this particular effect from within VFP?

No idea.

However, I am just thinking about a workaround. You can use a Timer, to postpone your refresh code a certain interval, for instance, half a second. Form.Refresh() would have to call:
with ThisForm.TmrRefresh
  .Enabled = .T.
  .Reset()
endwith
And the Timer itself will include all the refresh logic. Note that if Refresh() fires 10 times in one second, each Timer.Reset() will restart the Timer - no form refresh will be done. Only if there is no Form.Refresh() during the specified interval will your refresh work be executed.

The actual commands to do the refresh might be in a form method which you create.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform