0

hi I have a form in which i placed another form as MDI ,on moving the MDI form (Top,Bottom,Left,Right)it goes inside the boundaries of main form so the Mdi gets hidden. i want to restrict the MDI form to move when it touches the form boundaries.

karthik
  • 4,485
  • 8
  • 30
  • 45

1 Answers1

1

You need to capture the OnMove event for your child forms, and in that handler you need to make sure your child form's window rect is within the parent's boundary. If not you need to adjust the location of the child form.

An example of how to do this can be found here.

Community
  • 1
  • 1
demoncodemonkey
  • 11,730
  • 10
  • 61
  • 103