To sleep or to do 'events'. That is the question.
-
I discovered this little gem courtesy of our lead developer.
Application.DoEvents();
Thread.Sleep(1000);
Application.DoEvents();This is in a loop on the UI thread, called from a forms timer.
-
I discovered this little gem courtesy of our lead developer.
Application.DoEvents();
Thread.Sleep(1000);
Application.DoEvents();This is in a loop on the UI thread, called from a forms timer.
So the timer fires to make the app sleep. Kewl! :-D :-D :-D
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
-
I discovered this little gem courtesy of our lead developer.
Application.DoEvents();
Thread.Sleep(1000);
Application.DoEvents();This is in a loop on the UI thread, called from a forms timer.
-
I discovered this little gem courtesy of our lead developer.
Application.DoEvents();
Thread.Sleep(1000);
Application.DoEvents();This is in a loop on the UI thread, called from a forms timer.
Coded by lazy programmers, for lazy programmers... This is what happens when you sleep at work! :zzz:
It's an OO world.