Keeping MDI Child Forms within walls of MDI Parent without Code?

I was wondering if there is a way to prevent MDI Child Forms from moving out of view (being controlled by the user) within the MDI Parent Form without having to write a special function that keeps the Child Form within the boundaries of the MDI Parent?

Who is Participating?
Jacques Bourgeois (James Burger)Connect With a Mentor PresidentCommented:
Unless they came out with something new in framework 4 (a quick look do not reveal anything), it's not possible. I have searched for that a few years ago, and had to write my own code in the Move event.

The only way you could do that easily with the default mechanisms would be to react to the Resize event of the child to make sure that it is always maximized, which defeats the purpose of MDI.

Look at any standard MDI application, and getting out of the boundaries is the standard, even for big applications such as Word and Excel. It makes sense too if you put yourself in the pants of the user.

MDI is a user's tool, not a programmer's tool. If the user wants to see something at the left side of one form, and something at the right side of another one, he won't be able to do it if you prevent the forms from moving out of view.
BlakeMcKennaAuthor Commented:
That's what I thought and that's what I did...wrote some code to go in the Move Event.

Thank you for the confirmation!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.