title: "Ghost" MouseMove event in WinForms
body: <p>I have a custom control that updates two <code>NumericUpDowns</code> with the current mouse coordinates by handling the <code>MouseMove</code> event.</p>
  
  <p>However I have experienced a strange case where the <code>MouseMove</code> event is fired even when this should not happen (I have turned off my wireless mouse and disabled the trackpad). So, <code>MouseMove</code> happens even if the mouse does not move.</p>
  
  <p>I've made a simple check and verified that between these "ghost" <code>MouseMove</code> events the position of the mouse pointer does not change. I exploited this to my advantage to make sure that the method handling the event is only called when the pointer has actually moved, so I have been able to meet the requirements for my application.</p>
  
  <p>However, I am still puzzled, as I don't understand what could fire MouseMove events when all mice/trackpads are disabled. Looking at the call stack in Visual Studio, it seems to me that the firing of the <code>MouseMove</code> event is "genuine", as if the mouse really moved, not as if it was fired by some other part of the application (e.g. to simulate a <code>MouseMove</code>).</p>
  
  <p>Any suggestions on what might be the reason for this? Thank you!</p>
  
  <p>EDIT: Following King King's suggestion, I modified the code to print a string every time the message for <code>MouseMove</code> is detected. I've noticed that when the mouse is off and the pointer is hovering the control, the string is printed when I Alt-Tab to switch between application. Perhaps this has something to do with the application being redrawn?</p>