Controls on another form

MikeInNH

Newcomer
Joined
Jul 21, 2005
Messages
1
In the process of converting a j++ project to C#.

In the j++ project we have one form called frmWizard. We have these other forms which copy their controls to frmWizard. This is accomplished by copying the Panel which contains all the controls on the form. Then we use the method in the Panel in frmWizard to copy all the controls onto it.

An example of this is.

pnlQuestions.setNewControls(new Control[]{frmDialog.pnlPUProdAllocation});

The converted code looks something like this.

pnlQuestions.Controls.AddRange(new Control[] {frmDialog.pnlPUProdAllocation});

My question is......Is there an easier and cleaner way to do this in C#???
 
Back
Top