I can't say it any better than the documentation ;-)
"If you call DoEvents in your code, your application can handle the other
events. For example, if you have a form that adds data to a ListBox and add
DoEvents to your code, your form repaints when another window is dragged
over it. If you remove DoEvents from your code, your form will not repaint
until the click event handler of the button is finished executing.
"Typically, you use this method in a loop to process messages.
So the answer is, it depends. Do you want messages to be processed (such as
redrawing)? Or do you want to go for maximum performance and not do it?
--
Alex Papadimoulis
http://weblogs.asp.net/Alex_Papadimoulis
"Rich" <an*******@discussions.microsoft.com> wrote in message
news:1d*****************************@phx.gbl...
As I migrate my VB6 apps to vb.net I am checking what
features I need to retain from vb6. In vb6 I noticed that
DoEvents really made a performance difference when I
called it just before a Do/For loop for large datasets. I
hope do some multithreading in vb.net for this. But I am
not completely sure about how
System.Windows.Forms.Application.DoEvents()
works, or its application/purpose. Is this the same as
the DoEvents from vb6? Should I keep this feature in my
vb.net projects?
TIA,
Rich