The DoEvents() subroutine is still in VB.NET. It is located under the System.Windows.Forms.Application namespace.
In Visual Basic 2005 and Newer you can access it quicker under the ‘MY’ namespace
If you plan on using DoEvents() in a continuous loop, I would suggest using the GetInputState() api call.
The GetInputState() API will check whether there are any messages that needs to be processed and THEN it will call DoEvents() to process the messages. As a result, the code will be MANY times faster than if you used DoEvents() by itself.
Add this API call to the Declaration section of your application.
Private Declare Function GetInputState Lib "user32" () As Integer
GetInputState can let you know if any messages are queued up for processing before you use DoEvents().
If there ARE messages that needs to be processed, THEN call DoEvents() and let the messages go ahead and process.
Basic example from my Snippets page:
Do ' 'Checks if any messages are queued up before DoEvents(). 'If there ARE messages that needs to be processed, THEN it will 'call DoEvents() and let the messages go ahead and process. If GetInputState <> 0 Then Application.DoEvents() Loop Until Me.Text = "Done"