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

Advertisement
Faster DoEvents in Visual Basic

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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