views:

353

answers:

2

Hi!

I have a windows forms application where i add the mainloop in the constructor of the form like this:

      Application.Idle += new EventHandler(Update);

that works fine - however, my update function is not called when I minimize the application window. What do I need to do in order to get my update function called also while the window is minimized?

A: 

I'd have to try this to be sure, but my first guess is to wire up the form Resize event, and in the handler, check to see if the form is minimized...

Charles Bretana
The question is: _while_ minimized. Not _when_ minimizing.
Henk Holterman
@Henk, the OP says it doesn't work "when I minimize the application window" then later he says "... called also while the window is minimized", so I was/am not clear which he is interested in... Given that there seems to be little or no reason to be doing to be doing updates while the UI is minimized (What would be triggering the update??) I assumed he meant "when" it was being minimized...
Charles Bretana
+1  A: 
Jon Seigel