I think the problem with some of the controls in the Framework is that they simply wrap the common controls library. Because the drawing of these controls takes place in native code, they do not quite behave like a normal, managed code control would. Among the behaviors that are screwed up are, as you noticed, OnPaint and OnPaintBackground, as well as many messages not showing up in WndProc overrides.
Only solution to this is to find some 100% managed code Controls to replace the Framework controls. Occasionally I look for some, but havn't found any I liked yet.
Have a nice day, Robert W. Grubbs |