Rob Smyth

Wednesday, 3 December 2008

NPlot Problem On Vista

CPU loading goes to 100% on a Vista box when the mouse is moved over an NPlot .Net 2.0 chart. The displayed XY data tooltip flickers constantly. All fine on an XP box. The problem seems to be caused by Vista generating a mouse move event when a tooltip is displayed, even though the mouse has not moved. So if the tooltip is displayed while handlinge a mouse move (e.g. Control.OnMouseMove) you will get an infinite loop.

There is a bit of chatter on the net about tooltips and Control.OnMouseMove, so I added some code to NPlot's OnMouseMove override to do nothing if the mouse has not moved since the last call. This fixed the problem.

So if you have a WinForms application with any tooltips displayed over a control that change with mouse movement, best check CPU loading with mouse over on Vista.

No comments: