I have a form that is an md container and has a menu bar at the top. I add a child form to my mdi container, and when I maximize the child, it maximizes over menustrip. I want to know how to limit a child to a maximum value below menustrip. Any help would be appreciated.
Your child form is maximized as expected that child forms should be maximized in MDI. This does not really cover the menu bar of the parent form — it actually combines its own menu bar with the form of the parent form.
MDI ( ), - . :
if (this.WindowState == FormWindowState.Maximized) { this.WindowState = FormWindowState.Normal; this.Size = this.MdiParent.ClientSize; this.Location = new Point(0, 0); }
.
"- ", . ClientSize , MDI. , , , -, -. . :
ClientSize
/ MDI Winforms
MaximumSize , .
, , , , , . Dock DockStyle.Fill , .
, , , DockStyle.
, MDI , , DockStyle , FormBorderStlye FixedDialog ( ) .
, " ", WndProc (SC_MOVE) , .
Source: https://habr.com/ru/post/1720736/More articles:How to convince the client that all subsequent projects / improvements should be made through TDD (with some flexible practices)? - tddJavaScript to play MP3 - javascriptWill Visual Studio 2010 support Sharepoint 2007 development? - visual-studioGenerating XML from XSD - xmlBogus SVN File Name - svnWork with multiple XSD - xmlMapping Enumerations SqlDbType - C # - c #C #: how to make this method non-recursive - c #Creating a Windows DLL from C ++ source files - windowsКак я могу удалить SDL_Surface для замены другим? - c++All Articles