MessageBox.Show ("current form title bar height" + (this.) Height-this. Clientrectangle.height). ToString ());//Get the current form title bar height clientrectangle//Gets the rectangle that represents the control's workspace MessageBox.Show ( SystemInformation.PrimaryMonitorSize.ToString ()); Gets the size of the main display screen (pixels)//Gets the size of the current video mode of the main display (in pixels) MessageBox.Show ("menu bar height" +systeminformation.menuheight.tostring ()); Gets the height of the standard menu bar MessageBox.Show ("title bar height" +systeminformation.captionheight.tostring ()); Gets the height of the standard title bar menuheight//Gets the height of a menu row (in pixels) captionheight//gets the height of the window's standard title bar area (in pixels)
C # WinForm Gets the title bar, the status bar, the height of the menu bar