Posted 27 March 2018, 10:44 am EST
There are two different approaches to solve your problem.
The first is to create a “base form” and change all your forms to inherit from that base form.
Then in the constructor of the base form after the Initialiser, create a function to loop through
all controls on the form looking for C1TextBox and have that function change the detached property.
A better approach would by to create a factory method that would create an instance of the form type that you pass in. The factory method would instantate the form, loop through controls, look for type C1TextBox, set detached and then return the instantiated form to the calling method.
Hope this helps
Gerry