I think you want something like this:Now the Color_Class object always has a reference to a myButton_Class object so it can set the BackColor property of that object. You now have an instance on which to access the non-Shared member.vb.net Code:
Class myButton_Class Inherits Button Public myColor As New Color_Class(Me) Class Color_Class Private _button As myButton_Class Private _color As Color Sub change() Me._button.BackColor = _color End Sub Property color() As Color Get color = _color End Get Set(ByVal value As Color) _color = value End Set End Property Public Sub New(ByVal button As myButton_Class) Me._button = button End Sub End Class End Class




Reply With Quote