   WinForms - Idle?
  I'm writing a WinForms Application that redraws a certain control whenever it's Idle.  The performance has been sluggish (low FPS when moving a view-port over the surface of a level).  But then I realized that as long as the mouse is moving, the FPS increases.  I assume that means that the application is idle as long as the mouse is moving.  If anyone knows why this is true and/or how to ensure idleness while the mouse is not moving, I would greatly appreciate the help.   
  The "Idle" event doesn't mean what you think it means.The Application.Idle event is raised when the application becomes idle (that is, when the application empties its message queue). It does not fire while the application is idle. Thus, you get more idle events fired when you move the mouse (because the application becomes idle again after each mouse movement event is processed).The general solution to a game loop with Windows Forms is to hook Application.Idle and P/Invoke PeekMessage. In the idle handler, you loop until PeekMessage tells you a new message is pending, and in that loop you update your game.   ;  Thanks for responding.  I'm a little confused about PeekMessage.  Is that an event or a method?  What namespace is it in?  Thanks in advance   ;  It is a native function from the Win32 API. You need to P/Invoke it.   ;  Thanks for the help, everything is working just fine now.   