Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speeding up DoEvents()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00142550
Message ID:
00145775
Views:
32
>Rick,
>
>The only thing I've ever used DoDefault() for was to try and minimize missed mouse events that occur during CPU intense processing loops. Or to allow Cancel buttons to interrupt a process. I wonder if actually moving the mouse 1 pixel left/right would help your situation? Does it really hold up an indefinate amount of time (i.e. much longer that the 0.25 seconds DoDefault() takes to execute?) until real mouse motion occurs?

It goes eventually, but it sits for many seconds before it does and it
varies. It appears to have something to do with what's in the event
queue besides the mouse click.

I got it to work (see other message to Vlad), but I can't really say
why that minor change fixed the situation.

+++ Rick --

>
>I ran into something where a form of mine that runs in realtime with a timer telling it to refresh (which cascades through about 600 objects on the form) every 10 seconds. I was trying to get a little Shape to become visible at the start of the process and it goes invisible at the end. It serves as a heartbeat indicator assuring the user it's still working and to let them know during the time it's visible the system may miss some of their clicks. I found issuing a thisform.Cls() was needed to get the shape to show up reliably.
>
>>Here's what I'm doing: I have an object that performs a download
>>process and fires an OnUpdate 'event'. THis is event is trapped
>>in the form (object on the form) and it does a DoEvents to allow
>>trappng for a Cancel key hit basically.
>>
>>Problem is unless the mouse is moved the DoEvents just sits
>>there like a READ! Putting the MOUSE code in front of the
>>DoEvents appears to do nothing to help the situation. As soon
>>as you move the mouse things fly.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform