C
Chris
I want to extend a standard Button class (VS 2008, Compact Framework 3.5) - I
need to change background, draw lines etc. Unfortunately it is impossible to
override OnPaint method (I mean, I can override it, but this method never
fires). I need graphics object which is available in OnPaint method. Anyway -
how to create graphics object related to Button? There is no CreateGraphics
method in Button class. When I cast Button to Control and call
CreateGraphics() (it is available in Cotnrol class) UnSupportedException is
thrown.
Any ideas how to draw on a button? Or how to get Graphics object related to
the button?
need to change background, draw lines etc. Unfortunately it is impossible to
override OnPaint method (I mean, I can override it, but this method never
fires). I need graphics object which is available in OnPaint method. Anyway -
how to create graphics object related to Button? There is no CreateGraphics
method in Button class. When I cast Button to Control and call
CreateGraphics() (it is available in Cotnrol class) UnSupportedException is
thrown.
Any ideas how to draw on a button? Or how to get Graphics object related to
the button?