user7406 user7406 - 16 days ago 10
Vb.net Question

Disable the scroll bar in MDI Parent

It is possible to prevent scroll bars from appearing when you drag a Mdichild outside the bounds of the Mdiparent in vb.net?
I would prefer the solution to not involve checking the posistion of the child form as there are too many forms to alter.

Obviously autoscroll is set to false on the mdiparent
and setting VScroll and HScroll to false doesn't work

Answer

There's one solution that may work that I found: "How will I disable the scrollbars in MDI parent".

I would, however, change the code so that the method is called only when one of the child windows is moved or resized, instead of hooking to WndProc, which is very costly and, as the third comment notes, causes flickering.