Hey all, I'm using a BackGroundWorker to avoid UI freezing while working with a method which uses wait handles, and this method is used to draw on a panel in the UI and has panel invalidation inside.
something()
{
draw()
panel.invalidate()
A.waitone(500)
}
The problem is, sometimes the Worker gets stuck in the middle of the drawing and when I re press the worker start button it works again and doesn't get stuck, that means it wasn't stuck due to being busy, so the drawing which got stuck not the Worker, but I have invalidation after each draw, so any ideas??