if AEvent.WaitFor(0) = wrSignaled then
Zitat von
MSDN:
The time-out interval, in milliseconds. If a nonzero value is specified, the function waits until the object is signaled or the interval elapses. If dwMilliseconds is zero, the function does not enter a wait state if the object is not signaled; it always returns immediately.