Joe,
I assume you have two timers active then?

1. Have you disabled the timer so that it cannot fire whilst the timer event
is active? I.e first command in Timer event -> This Enabled=.F. and the last
command This.Enabled=.T. before the return.

2. Have you put in a DoEvents command in the Timer loop to make sure that
standard windows events are processed in the loop?

Other than that, could use more information on the code you have in the
timer event(s) before offering suggestions.

Dave Crozier


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Joe Yoder
Sent: 18 September 2007 16:42
To: [email protected]
Subject: Killing time while waiting for a timer event

I have a simple program where I send a command to a device and setup a timer
to write "DONE" to a form property when 100 milliseconds have elapsed. The
program then sits in a loop waiting until the the form property changes to
"DONE" before proceeding to process the results.
 
When I run the code the program hangs in the loop permanently. When I step
through with the debugger everything seems to work properly.  When I put a
wait window inside the wait loop, the program exits the loop properly.
 
There is obviously something I don't understand.  Can someone help?
 
TIA - Joe Yoder


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to