How to add all controls of another form to a form in Winforms?
I tried using:
CoolForm.ActiveForm.Controls
but the count returns 0.
The main form that is shown is AppForm and has all the controls.
I want to add all the controls of CoolForm (wh开发者_高级运维ich has 1 form) to be added to the main form (AppForm)
Is this possible?
I found the answer, I had to instantiate CoolForm inside AppForm and then access its controls. But if there is a better way, let me know.
精彩评论