|
-
August 26th, 2010, 08:20 AM
#3
Re: How to UseWaitCursor correctly
DoEvents is easy method allowing to keep UI responsive while long calculation is done. To have consistent results, you need to disable every control, possibly the whole form, while the loop is running, to prevent unexpected results, like closing the form or button click. Another way is to ignore any user command when long calculation is active, this can be done by using simple boolean flag. Of course, multithreading is the real thing, if you have a reason to use multithreading, do it and leave DoEvents to VB6 programmers.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|