Yeah, I figured to that the VCL is the problem. Peter of TeamB said in one post on google "The way the VCL is written makes it impossible to have any form but the main form as MDI frame window."
But I checked out "CreateWindowHandle" and I believe that you are right. Inheriting to a new formclass bypass that code completely and assign a different mainform should work. Actually it seem very easy. It probably isn't... well.. I hope the original poster get it to work :) Regards, Fredrik. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Posey Sent: Wednesday, August 10, 2005 9:40 PM To: Delphi-Talk Discussion List Subject: Re: SV: MDI frame not main form? Fredrik Larsson wrote: > Since I am a curious person I tried to do it. A D5-application allow me to > create two MDIForms. But the children always go to the mainform if it's an > MDIForm otherwise it raises "cannot create, no mdiforms active" message. > > What you are referring to is creating own MDI-handling or some 3rd party > component? Seems I should have tested this before replying. AFAIK from the Windows API perspective there's no requirement for an MDI Mainform to be a Windows application's Main Form. However, there ARE assumptions in the VCL that any MDI form is the Application.MainForm. (Look in TCustomForm.CreateWindowHandle). Since CreateWindowHandle is virtual, it should be possible to create a descendant that avoids those assumptions; but I don't have the time/resources at the moment to dig into this much further, I fear. Stephen Posey [EMAIL PROTECTED] __________________________________________________ Delphi-Talk mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi-talk __________________________________________________ Delphi-Talk mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi-talk
