Good day. There was quite a ridiculous problem. There is a form with a chart, a graph is displayed on the chart from another thread, everything works fine. But as soon as the form is minimized, the terrible application brakes start after deployment, the graph is barely displayed, the buttons are not drawn.

Language с# .NET 4.0

  • Try to roll back the application until it slows down to see where the problem is, well, and see if there are extra threads, connections, etc. were closed - johniek_comp
  • one
    Is it in debug or release build? If it’s debugging, then surely from somewhere a cliff of tricks has come up, but they are extinguished by someone. - Chad
  • Archive with an example in the studio. - andreycha
  • Take dotTracer and see where the problem is. - wind

1 answer 1

There may be several problems. The first thing that comes to mind is that most likely there is a call to this form or its components from different streams of the same application. In such a case is to take care of synchronization of threads. Even such glitches can occur if you create components (visual) on the fly, that is, dynamically. True, in this case, a second error may occur - EOSError 1400 Недопустимый дескриптор окна .

I also advise you to update the output device context after each restaurant window. This can be done using the Refresh () or Repaint () method, as far as I can remember ...

  • I have such a vague suspicion that the well-known EOSError 1400 programmer has no relation to .NET / WPF / WinForms . - Costantino Rupert
  • And I also have a vague suspicion that @ Chad is the closest to the truth. - Costantino Rupert