Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DoEvents
Message
From
05/10/2000 20:01:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
DoEvents
Miscellaneous
Thread ID:
00425750
Message ID:
00425750
Views:
52
Hi!

Is it true that doevents has become slow again?

I have a function which I think worked fine and really speeded up DoEvents a lot but now when I run it there is not much difference if I call my function (5.1180 seconds) or call doevents (5.4380 seconds) directly.

Is SP4 responsible for this? I Have VFP 6 SP4

Thanks

Sarosh

*--Code:
lnSeconds = seconds()
for i = 1 to 100
doevents
endfor
? "Total time: " + str(seconds() - lnSeconds, 7, 4)
*-- 5.4380 seconds

lnSeconds = seconds()
for i = 1 to 100
ProcessEvents()
endfor
? "Total time: " + str(seconds() - lnSeconds, 7, 4)
*-- 5.1180 seconds

function ProcessEvents
local lnRow, lnCol, lcWindow

lcWindow = wontop()

lnRow = mrow(lcWindow)
lnCol = mcol(lcWindow)

if ( lnRow > 0 ) and ( lnCol > 0 )
if empty(lcWindow)
mouse at lnRow, lnCol
else
mouse at lnRow, lnCol window (lcWindow)
endif
else
keyboard " "
=inkey()
endif

doevents

return
Next
Reply
Map
View

Click here to load this message in the networking platform