: : : I've only seen one way to do this and it involved various win32 API calls to pretend like a form in a DLL is a child of an MDI form. There's no way to do it without clever hacking like this.
: : :
: : :
: : :
infidel
: : :
: : :
: : : $ select * from users where clue > 0
: : : no rows returned
: : :
: : :
: :
: : And there is no way the Parent MDI Form (in the main app) can create an instance of those MDI childs?
: : Shouldn't that work? I mean: the instances of the MDI childs forms belong to the main application, so to the MDI Parent. The only difference is that the code is exposed by another project!
: :
: : Greets...
: : Richard
: :
: :
:
: The API would let you, I believe; it's just VB that won't. VB also doesn't tell you that there's no difference between MDIChildren, MDIForms and Forms. The MDI property of a MDIForm is a MDI control set on a normal form. The MDIChild property merely designates the MDI control as the parent instead of the desktop. So don't be at all surprised if VB won't let you use a MDI child in a seperate project.
:
: Option 1: I've seen a control you can get that would allow you to drop an instance on a MDIForm and on MDIChildren in a seperate project. VB is somehow tricked into showing them properly. Unfortunately, I had no use for it so you'll have to hunt the net. Incidentally, this control is probably doing what infidel mentioned.
:
: Option 2: Create a "hosting" form in the MDI project. When you want to show a new MDIChild, create a new instance of the hosting form, pass it to the DLL and let the DLL create a "MDIChild" and move it onto the hosting form. This is my method though I haven't tried it in forever. I also suspect it's the basis for usercontrols.
:
Hi there,
Your option 2 seems a good ideia to try !
I haven't understood what you mean when you say "move it onto the hosting form" ! How can i do that ?
Thank you