Create a copy of a control at run-time
We are trying to create a copy of a control and all its properties at runtime. The problem is that there are no control arrays as in VB6, and we cannot issue the command
Dim tb as New Textbox1 (for Textbox1 being the control we want to copy)
and Dim tb as Textbox = textbox1 doesn't work cause we will have to issue the next command tb = New Textbox (and cannot issue tb = New Textbox1)
And the big problem is that there is no Clone method for the object Control.
How to solve this problem?
If you have an idea, your help will be most appreciated
Thanks!