Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Equivalent of VB 6 DoEvents

Tags:

c#

.net

vb.net

vb6

VB6 had a DoEvents() method that you called to return control to the OS and mimic multi-threaded behavior in that single threaded environment.

What is the .NET framework equivalent of VB 6 DoEvents()?

like image 666
Water Cooler v2 Avatar asked Sep 03 '12 01:09

Water Cooler v2


2 Answers

you can use Application.DoEvents(). Why not use Threading class or simply Background Workers? If you are doing in .net environment, don't use DoEvents. Leave it on VB6.

like image 126
John Woo Avatar answered Oct 02 '22 20:10

John Woo


Application.DoEvents() (part of WinForms)

like image 23
Zippit Avatar answered Oct 02 '22 18:10

Zippit