Passing parameters to forms

  • Thread starter Thread starter Gav
  • Start date Start date
G

Gav

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
 
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
 
Back
Top