tags:

views:

46

answers:

1

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 (which has 1 form) to be added to the main form (AppForm)

Is this possible?

A: 

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.

Joan Venge
Where were you instantiating CoolForm before? Not in AppForm? You need to have the reference to an instance of a CoolForm to work with it's members.
Groo
Yeah I didn't know it was the case for forms.
Joan Venge