Faster DoEvents in Visual Basic

This is an interesting way of speeding up DoEvents, which is useful in a loop. It’s expensive, but necessary in your programme if you want it to respond to user actions. GetInputState() is cheaper, and it’s easy enough to use Windows API calls in Visual Basic code.
If GetInputState <> 0 Then DoEvents

Faster DoEvents in Visual Basic

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.