Help - Assigning MDI Child to MDI Container when called in a Modul

Help - Assigning MDI Child to MDI Container when called in a Modul

Post by TGVv » Thu, 07 Apr 2005 22:53:03


I am trying to figure out how to assign the child form to the mdi container,
in VB, when the child is called from a module and not from the container form.

I know when called from the container form it is just:
dim form1 as new form1
form1.MDIParent = me (being the container form)

but this does not work when you do this in a module.

Thanks

Leo
 
 
 

Help - Assigning MDI Child to MDI Container when called in a Modul

Post by Christof N » Fri, 08 Apr 2005 00:21:54

Hi Leo,

the module has to know wich shall be the MDIParent.
There are two options:
1. Their is a shared variable (or a variable in a module) that is assignd
the parent.
This would be the best option if there is one MDIParent in your app, wich
most probably is true.

2. The method puting the form in the container has a parameter wich is the
MDIParent.
Then the caller has do know, which form shall be the MDIParent.


"Leo" < XXXX@XXXXX.COM > schrieb im Newsbeitrag