Click here to Skip to main content
15,893,508 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi, I do a Question of DataGrid and They Work All perfect, So I think that here is the best place to do my question.

Well, Like the title say. I dont want to Allow that a User can Move a subform out of MainForm Windows.
Also I posible to Freeze the Form for don't allow user to move?

Thanks. ;)
Posted

well, it can be done in 2 ways

first, grab LocationChanged event of subform and dont let it go outside the main form's bounds.

second, add a Panel to your main form and add the subform in it but to do that you must set sub form's TopLevel property to false.

something like this

subform.TopLevel = false;
subform.Show();
panel1.Controls.Add(subform);
 
Share this answer
 
Now I read more and I found Mdi.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900