c# - Application.DoEvents() and freezing on some machine -


i have winforms application makes calls application.doevents(). app freezes around time method called (no surprise).

however, happens on machines. fair due machine or still down code/application.doevents()? in case, should refactored use backgroundworker.

would machine/environment issue or oppurtunity use backgroundworker?

use background worker if can. doevents 'hack' allow application remain responsive, , process wm_paint messages mostly, when it's doing it should never doing: blocking execution more reasonable time during message processing in main gui loop. if doevents causes hang instead of fixing it, have many messages spending way system power. fork them out background workers fix of @ once - it's matter of time before "some machines" becomes "most machines" otherwise.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -