Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting a timer programmatically
Message
 
To
22/04/2002 15:27:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00647797
Message ID:
00647958
Views:
22
This message has been marked as the solution to the initial question of the thread.
>I usually set a timer with the visual interface. However, in a special case, I need to set a timer programmatically. The reason is that I have a specific line of code that may take a while to execute. If it takes more than 25 seconds, I want to return back to the main program. I would then return a message to the user. What's the proper way to implement that?
>
>Here's the approach:
>
>
>loHTTP=CREATEOBJECT('Microsoft.XMLHTTP')
>loHTTP.Open('GET','MyUrl',.F.)
>
>* This is before the special line
>* We have to instantiate a timer of 25 seconds here
>loHTTP.Send()
>
>FUNCTION TimerReached
>* Return back to main program
>
>
>Or, unless someone knows if the XMLHTTP object has a built in timer. Is that possible?

I think you must use the SetTimeOut() method before Open()...
See: http://msdn.microsoft.com/library/en-us/xmlsdk30/htm/xmmthsettimeouts.asp?frame=true
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform