Console Application.DoEvents() SOLVED!! example
yes i also got crazy about how to impersonate the glorious WinForms Application.DoEvents(), since if u do Thread.Sleep() the whole app stops!
it then came to mind its so simple:
//the condition is the events that u want to see done, u must oversee them, check
http://bresleveloper.blogspot.com/2012/05/muti-threading-in-forforeach-example.html
while (!AllThreadsFinished)
{
//here is where DoEvents+Sleep u usualy go
Thread waitThread = new Thread(() => WaitThread(100));
waitThread.Start();
waitThread.Join();
}
OH! extremely recommended to declare waitThread before the while and null it after else thing might get slow...
void WaitThread(int mls)
{
Thread.Sleep(mls);
}
P.S. - if u use classes with forms for some stuff like browser navigation u dont have a choise but using the winforms ref and use the DoEvents().
it then came to mind its so simple:
//the condition is the events that u want to see done, u must oversee them, check
http://bresleveloper.blogspot.com/2012/05/muti-threading-in-forforeach-example.html
while (!AllThreadsFinished)
{
//here is where DoEvents+Sleep u usualy go
Thread waitThread = new Thread(() => WaitThread(100));
waitThread.Start();
waitThread.Join();
}
OH! extremely recommended to declare waitThread before the while and null it after else thing might get slow...
void WaitThread(int mls)
{
Thread.Sleep(mls);
}
P.S. - if u use classes with forms for some stuff like browser navigation u dont have a choise but using the winforms ref and use the DoEvents().
Console Application.Doevents() Solved!! Example >>>>> Download Now
ReplyDelete>>>>> Download Full
Console Application.Doevents() Solved!! Example >>>>> Download LINK
>>>>> Download Now
Console Application.Doevents() Solved!! Example >>>>> Download Full
>>>>> Download LINK rq
Thanks for sharing the valuable information.
ReplyDeleteHome Nursing Services in Hyderabad
nursing services at your door step
Home Physiotherapy Services