Hi,
I've a parent form frmParent and a child form frmChild. I open the child form as a modal dialog from the parent form as below --
frmChild.ShowDialog(this);
Now, when the child form is opened, I'm able to move the child form outside the parent form. Is there a way to restrict the Modal form to move within the Parent form ?
Thanks,
Loading
VulpesPosted Nov 10, 2011, 9:57 AM
What does work is to set the dialog's start position to 'CenterParent' and then handle its WndProc to intercept the SC_MOVE message and prevent it from being moved at all.
If that's of interest, the code is as follows:
// on parent from
// on child form
sasikumarPosted Nov 10, 2011, 11:35 PM