|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DoEvents in c#.netHi, guys,
As you know, in VB6, we have have DoEvents. How can we do the same job in c#.net? Thanks. Hello,
short answer: Don't use it. Long answer: You can call Application.DoEvents() to get a similar functionality. But if you perform long-running tasks, perform them on a background thread and just use the UI thread to update the UI. In .NET, you can utilize the BackgroundWorker for that. It nicely handles all the cross-thread calls which are necessary to update the UI. In .NET 1.1, use the ThreadPool or a dedicated new thread and update the UI with calls through form.Invoke(), where form is the window you want to update. Best regards, Henning Krause Show quoteHide quote "Andrew" <And***@discussions.microsoft.com> wrote in message news:55C9C399-7886-44B1-B0E0-1272DC6D3614@microsoft.com... > Hi, guys, > > As you know, in VB6, we have have DoEvents. > > How can we do the same job in c#.net? Thanks. Application.DoEvents();
Show quoteHide quote "Andrew" <And***@discussions.microsoft.com> wrote in message news:55C9C399-7886-44B1-B0E0-1272DC6D3614@microsoft.com... > Hi, guys, > > As you know, in VB6, we have have DoEvents. > > How can we do the same job in c#.net? Thanks.
Other interesting topics
Programmatic diagnostic questions about dlls
Is This Overkill? serialize a property of a collection Framework, ProtocolType.Icmp and VISTA Setting required framework version Problem : 2 different ASP .Net running in one IIS Are they the same day? 2.0: "Debugging failed because integrated Windows authentication in not enabled" compact framework laptop |
|||||||||||||||||||||||