|
I’m really surprised. I have used VB for several years, and I never knew that DoEvents would have problems.
"DoEvents will reduce the efficiency of program execution", my understanding is: "DoEvents is meant to reduce the efficiency of your program execution". What you should know is that in the loop, every time DoEvents is executed, your program will release you CPU control right (of course this is within your privilege level), at this time, your program and the system will check whether there are other places that need the CPU, and the CPU will return to the back of DoEvents after executing other requests The statement continues to execute.
Having said that, if your program is so fragile that DoEvents (instantly in the loop) will affect your performance, the problem is often that your code is not good enough. |
|