David,
When will there be no wontop()? Does that happen in an app where there are no windows currently in _screen? If there's no window what's the UI that requires a DoEvents() call?
>The code works fine except where there's no wontop() so you need something like