The ListView class encapsulates the List-View common control. Sticking to pure managed code won't accomplish what you need. You must extend the ListView control, override WndProc, and handle windows messages like you would in VC++. There are plenty of articles here on CodeProject about this, and you should familiarize yourself with the windows messages and common controls by reading Windows Controls[^]. For one example, see a previous post about defining an event to fire when column widths change: http://www.codeproject.com/script/comments/forums.asp?msg=807702&forumid=1649#xx807702xx[^]. Another good article about handling notification messages for the List-View common control (because that's really what this all comes down to) is http://www.codeproject.com/cs/miscctrl/listviewfilter.asp[^]. In your case, since you're paining, you'll need to handle the NM_CUSTOMDRAW message (for a list-view). This will, once you've handle the right sequence of windows messages, give you an HDC (handle to a device context). You can get a Graphics object from this by using Graphics.FromHdc, but simply overriding the OnPaint method (or handlig the Paint event, which is much slower and a bad idea when done in a derived control) will not work. You must draw to the DC that the list-view is using for the list-view column header.
Microsoft MVP, Visual C# My Articles