Delay an Application Until a Specified Condition is True II
Version Compatibility: Visual Basic 5
A better way is to use Win32API-Events.
A quick test of the while not bCancel:DoEvents:wend method showed 97% processor usage on WinNT 4.0 / 233Mhz! My method uses only "normal" processing time.
Instructions: Copy the declarations and code below and paste directly into your VB project.