Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer within a timer?
Message
From
07/11/2001 12:03:07
 
 
To
07/11/2001 08:51:46
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00578290
Message ID:
00578563
Views:
16
Thanks for your repley, David. I like the idea of using the loop. (I have never worked with windows API so I don't know where to start) Say I have a button on the form, called cmdStop. (it sets the timer enabled to false thus stopping the whole process) Is there a way I can tell if that button has been clicked during the while loop? Currently if I click the button the click event doesn't fire until the loop is over. I tried also tried:
DO WHILE DateTime() < tTime + 5
     if thisform.cmdStop.gotFocus()
          exit
     endif 
ENDDO
But the gotfocus event was firing all the time.

Thanks!
Chris

>
>Instead of a second timer, try something like this:
>
>*: Found a file, wait 5 seconds to be sure it's complete
>LOCAL tTime
>tTime = DateTime()
>DO WHILE DateTime() < tTime + 5
>ENDDO
>
>
>Or, to save processor time for other programs, you can use the Windows API Sleep().
>
>DECLARE Sleep IN Win32API INTEGER nMilliseconds
>
>Then in your timer event
>
>=Sleep(5000)
>
>See WindowsAPI#12645 in the UT for more information.
Previous
Reply
Map
View

Click here to load this message in the networking platform