Where, oh where has my MDI-child gone?

sund...@primenet.com (Sundial Services) wrote:
>I have an app with a main form - featuring buttons and panels and such - which
>I want to be a MDI parent window.  And I have a form that I want to be the
>Well, when I set these up with formStyle "fsNormal," everything works.
>But if I set the styles to "fsMDIFrame" and "fsMDIChild," everything seems to
>work... the child gets added to the Window menu.... but the child is not
>visible on the screen!
>Remember, it works fine as non-MDI, the child window is visible and all
>that... but when it's switched to MDI, the child window is created but is
>never visible.
>Furthermore, the "showing" and "visible" properties of the child are true!  So
>where is it?  :-/
>Any ideas?

I was able to emulate this problem by dragging the child towards the
bottom right of the screen at design time and setting the Position
property to poDefaultSizeOnly.  When run, the MDI application then put
the child outside of the visible window.  Since I generated the MDI
application from the template, scroll bars were put on the form.  If
you created the application in another way this might not be the case.

It might be interesting to quickly add a "Cascade" menu function (as
demonstrated in the Delphi demos) to see if it moves the child back to
a visible position.

Hope this helps!

Phil Kramer