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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only