Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mouse HourGlass Stays on screen
Message
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00740536
Message ID:
00740641
Views:
17
>Michael,
>
>>I had a similar problem which went away when I optimized a piece of code to eliminate superfluous assignments to Image.picture properties.<
>
>I read the link you gave - and tried the solutions - but so far it hasn't helped.
>
>Would you mind telling me the changes you made that actually corrected the behavior?
>
>Mel Cummings


Mel,

My app has a timer that refreshes the appearance of a bunch of image controls and their parent containers, residing in _screen. I was seeing just the sort of flaky hourglass behavior you describe, esp. on slower machines, but even on a fast one, to a lesser degree. The pattern of cases where the problem occurred was strange, indicating that this was not simply a matter of performance.

I decided to try two things: optimize the refresh logic, and issue a no-op mouse operation (a la fast DOEVENTS) after each refresh. As I recall, I tried the mouse operation first, but that didn't fix it. Without concluding the mouse no-op experiments exhaustively, I switched to a quick pass at optimizing the refresh code. I'm just about certain that the change that did the trick was what appeared to be a minor optimization, avoiding loading image.picture if I knew it already contained the file I was about to load. Bingo, the problem went away, even on the slowwwest machine. After this change, the cases that used to exhibit the lingering hourglass now just show a brief hiccup, with the hourglass disappearing as it should.

Later, I noticed the thread I pointed you to, and it rang a bell: there seems to be a bug in loading image controls. Maybe it only manifests itself when a sufficient threshold triggers the hourglass, so there's a relationship to performance, but it's not a simple cause-effect.

In my case, it turned out that simply not performing unnecessary image loadings fixed the problem, but I'm not sure how I would have resolved it if it had been logically necessary to load those images.

Mike
Montage

"Free at last..."
Previous
Reply
Map
View

Click here to load this message in the networking platform