Rob Smyth

Wednesday 3 December 2008

AssemblyInfo.cs

Visual Studio creates an AssemblyInfo.cs file for each project in a solution in a 'Properties' folder. Thing is that, more often than not, I'm more interesting in an application's version than the individual assembly's version, and the solution is the application. So I find that each time I create solution with multiple projects (assemblies) I add a 'Common' project that has an AssemblyInfo.cs file to be used by all other projects. That way all assemblies have the same version information.

To do this delete the AssemblyInfo.cs file in each project and then 'Add Existing item' browse to the common AssemblyInfo.cs and add as link. This way all projects share the same AssemblyInfo.cs file. Unfortunately Visual Studio does not allow adding any items to the 'Properties' folder.

Good way to go even if the AssemblyInfo.cs file is manually updated or created/updated automatically.

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.