Public Class ClassControl Private props As BaseProperties Private ctrl As Control Public Sub New(control As Control) ctrl = control If TypeOf control Is Label Then props = CreateBasePropertyObject(New LabelProperties()) ElseIf TypeOf control Is TextBox Then props = CreateBasePropertyObject(New TextboxProperties()) End If End Sub Public ReadOnly Property Control As Control Get Return ctrl End Get End Property Public Property Properties As BaseProperties Get Return props End Get Set(value As BaseProperties) props = value End Set End Property Private Function CreateBasePropertyObject(obj As BaseProperties) As BaseProperties obj.ID = ctrl.Tag obj.Name = ctrl.Name obj.Location = ctrl.Location obj.Width = ctrl.Width obj.Height = ctrl.Height Return obj End Function End Class