Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

MDI Oddball issues

kaennonkaennon Posts: 5Member
Hey All,

I have an MDI parent Container, I dock a tree view control to the left of that container, and bring up various child forms on the right side of that container. Im having an issue with this, I dont want the user to beable to resize or move the child forms I bring up, I want it all done through the treeview control. When I maximize the code in the form, I set the Control Box, Minimize, and Maximize properties to false, but for some odd reason it still displays the control box and other buttons in the file menu bar of the parent container. The funny thing is, it has disabled the close and minimize buttons. Another odd point to consider is that the restore button is enabled, so if the user clicks it, my form will shrink down to its original size, but after you click the restore button and only after you click the restore button, the control box goes away. Heres the code

this.SuspendLayout();
Form cForm = new Form();
cForm.MdiParent = this;
cForm.WindowState = FormWindowState.Maximized;
cForm.FormBorderStyle = FormBorderStyle.None;
cForm.MaximizeBox = false;
cForm.MinimizeBox = false;
cForm.ControlBox = false;
cForm.Show();
this.ResumeLayout();

Any Ideas would be greatly appreciated.

Thanks,
kaennon
Sign In or Register to comment.