T
Tony Vitonis
Hi. I've created a "numeric text box" that inherits from the TextBox
control. I've given it a Replace method that looks like this:
Public Sub Replace(ByVal TB As TextBox)
Me.Size = TB.Size
Me.Location = TB.Location
TB.Parent.Controls.Add(Me)
TB.Parent.Controls.Remove(TB)
End Sub
Callers can say NumericTextBox.Replace(NormalTextBox), which works
fine.
The thing is, instead of copying just the Size and Location properties
explicitly, what I'd like to do is iterate through the TB object's
properties and copy each of them from TB to Me. Is there a way to do
this? Thanks.
control. I've given it a Replace method that looks like this:
Public Sub Replace(ByVal TB As TextBox)
Me.Size = TB.Size
Me.Location = TB.Location
TB.Parent.Controls.Add(Me)
TB.Parent.Controls.Remove(TB)
End Sub
Callers can say NumericTextBox.Replace(NormalTextBox), which works
fine.
The thing is, instead of copying just the Size and Location properties
explicitly, what I'd like to do is iterate through the TB object's
properties and copy each of them from TB to Me. Is there a way to do
this? Thanks.