I know how to clone a control *, but I have a problem with the original one (the one set in the window at design time.
In a loop I add some controls and set their name, location,
But, in the end, I have one too many, the original one. It can be either a TextField/TextArea with a Label, a PopupMenu, etc.
The Method design is as follow:
a. Open a Text file with instructions,
b. In a While Not Ctrls_TIS.EOF / Wend,
a. I New a Control,
b. I set some of its Properties (Name, x,y,w,h, must add a Label or not, Control Name.
c. When I am out of the loop, I have the first Control(s) to dispose (remove); I cannot (I think) move it out of my window because with Tab(s), the user can access to it.
Ideas ?
- And my Method to do that works fine, I get my Controls when I get the hand at
Window1.Open
time.
There is something I lost (forget) while designing that window code.
Ideas ?
Edit:
The code below leads to TWO PushButtons in the target window.
Dim pb As PushButton
pb = New PushButton1
pb.Caption = "Clone"
pb.Left = Me.Left + Me.Width + 10