Peter,
If you don't want to process any events, simply
isable() the window. When you are done, :Enable() it.
Also if you do an intensive loop, you should call SysRefresh(), at certain places, to let Windows process its pending messages, or Windows will stop responding.