It allows the UI to be updated and remain responsive. Remove that and the loop is too tight and the UI is non-responsive.
You would NOT use it if you had a Shell class with the DataAvailable and Completed events defined.
It allows the UI to be updated and remain responsive. Remove that and the loop is too tight and the UI is non-responsive.
You would NOT use it if you had a Shell class with the DataAvailable and Completed events defined.
DoEvents is evil
Like „goto“
DoEvents can destabilize your program. But it depends; there is no guarantee that it does.
As I stated above - for procedural, functional, top-down code, it’s a necessity to keep your UI responsive. Just like when used in a Console app.
For OOP coding (such as using a Shell Class with te DataAvailable and Completed events), it can produce recursion issues - but the SHell class shouldn’t be blocking in that case.
And some of us old-timers still you GOTO with great success