I was wondering if we could clone all the properties of a control to another control (of same type).
For me, I want to clone the properties of the existing textbox to the dynamically created textbox. For that, I would do,
But newBtn starts referencing btnExisting, rather.
And it is pain to newBtn.Property = btnExisting.Property for each property I want to clone.
I look forward for any way to accomplish my objective.
Thanks!
For me, I want to clone the properties of the existing textbox to the dynamically created textbox. For that, I would do,
Code:
Dim newBtn as Button
Me.Controls.Add(newBtn)
newBtn = btnExisting
And it is pain to newBtn.Property = btnExisting.Property for each property I want to clone.
I look forward for any way to accomplish my objective.
Thanks!