zoomz
zoomz

Reputation: 125

It is possible to create more than one MDI form in a delphi application?

I developed a mdi application that has in its main form several child windows that are created at runtime. The child windows are custom forms. I want to display those custom forms in another form from the same application. Is this possible?

Upvotes: 6

Views: 915

Answers (2)

David Heffernan
David Heffernan

Reputation: 613422

I don't believe this is possible in the VCL. As I understand it the MDI form is assumed to be the main form (Application.MainForm). I imagine the underlying Windows routines will not have any such assumption, but I think the VCL will not let you do this without some serious hacking.

At various points in the VCL framework, the important MDI messages are sent to Application.MainForm.ClientHandle. Now, ClientHandle is the MDI container, but for some reason the container for the main form has been singled out.

Upvotes: 0

Lars Truijens
Lars Truijens

Reputation: 43625

No, that is not possible using standard VCL. Only the application's MainForm can be the MDI Form. But it should be possible by using win32 directly as shown here.

Upvotes: 8

Related Questions