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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top