title: paintcomponent repeats itself without any user interaction
body: <p>I'm working on a project which uses paintcomponent.<br>
  The problem is that this paintcomponent method is executing itself repeatively without asking.<br>I discovered this problem by creating a counter that raises the method runs everytime and I printed this out. Now is see that the method repeats itself randomly.<br><br>
  The problem is that this makes message boxes etc execute multiple times and freeze.<br>
  How can I solve this?</p>