That was the first thing I tried, and it didn't work for the text property.
The purpose is to create a standard "Exit" button with a message box asking
them if they really want to exit. Then, anytime I need an exit button, I can
just drop it on the form without having to change the properties that are
going to be the same for all of the exit buttons.
"Maqsood Ahmed" wrote:
[color=blue]
> Hello,
> I don't understand why are you trying to make a custom button class,
> you can do what you want by using System.Windows.Forms.Button class.
> Anyways, instead to doing this whole exercise just write,
>
> this.Text = "E&xit";
>
> in custom button's constructor. There is no need to override text
> property since you are always getting base.Text.
>
> HTH. Cheers :)
> Maqsood Ahmed [MCP,C#]
> Kolachi Advanced Technologies
>
http://www.kolachi.net
>
> *** Sent via Developersdex
http://www.developersdex.com ***
>[/color]