C
CroDude
Hi all!
I've made a button from scratch derived from a Control class. The main
reason why Control and not Button class is used for inheritance is that when
deriving from a control class it's possible to have a transparent
background, while if derived from a button class it isn't.
That's achieved through:
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
But the problem appears when I place my buttons on a form and try to set
them as a OK/Cancel buttons. It seems that a form can't recognize my buttons
when I want to choose them as OK/Cancel button of a Form.
Is there something that I'm missing? Please help!
Thanks in advance!
Dinko Pavicic
I've made a button from scratch derived from a Control class. The main
reason why Control and not Button class is used for inheritance is that when
deriving from a control class it's possible to have a transparent
background, while if derived from a button class it isn't.
That's achieved through:
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
But the problem appears when I place my buttons on a form and try to set
them as a OK/Cancel buttons. It seems that a form can't recognize my buttons
when I want to choose them as OK/Cancel button of a Form.
Is there something that I'm missing? Please help!
Thanks in advance!
Dinko Pavicic