
Create a Custom Control (not a User Control, AFAIK)
I am wanting to inherit from the standard Button and
override the background color property; assigning the
new Button the name MyButton, as below:
------------------------------------------------------
Imports System.WinForms
Public Class MyButton : System.WinForms.Button
Me.BackColor = Color.LightGray
End Class
------------------------------------------------------
I get the error:
Expected variable, constant, Enum, Type, or procedural
declaration.
under 'system'.
Can anyone show a 'tested' and 'proven' means, in VB,
to simply inherit from a standard control and override a
default property such as background color. This should
be simple, but I have been unable to find a sample in
the SDK's.
MyButton needs to also appear, and be persistent, on the
ToolBox.
Thanks,
Jim Holloman