Application.DoEvents Alternative

Xancholy

Well-known member
Joined
Aug 29, 2006
Messages
143
Programming Experience
Beginner
Using Application.Doevents on a child form halts my UI until it completes. Is there any alternative that will not affect user interface ?

Thanks
 
Using DoEvents has always been a bit of a lame (though necessary in singlethreaded languages like vb6) way to ensure a UI remains responsive. Write your application in a proper multithreaded manner, using background threading for long running jobs. Have a google for BackgroundWorker, a utility class that makes it simple
 

Latest posts

Back
Top