Hi all,

I have a function that handles opening child forms in a MDIContainer, I want
the child forms to accept a parameter to setup the form when opening. So I
simply overloaded the constructor to accept the parameter...that easy
enough, however the function that opens the form checks first to see if it's
already open and if so just sets focus to that window. Does anybody know how
I can setup the form before giving it focus this way?

Thanks
Gav

Re: Passing parameters to forms by Jakob

Jakob
Wed Mar 09 14:00:10 CST 2005

Forms are like any other classes. So, just create the needed properties
on the form class of yours, and set them appropiately before you
activate it.

Hope this helps,
Jakob

Gav wrote:

>Hi all,
>
>I have a function that handles opening child forms in a MDIContainer, I want
>the child forms to accept a parameter to setup the form when opening. So I
>simply overloaded the constructor to accept the parameter...that easy
>enough, however the function that opens the form checks first to see if it's
>already open and if so just sets focus to that window. Does anybody know how
>I can setup the form before giving it focus this way?
>
>Thanks
>Gav
>
>
>
>