MessageBox.Show("当前窗体标题栏高度"+(this.Height - this.ClientRectangle.Height).ToString());//获得当前窗体标题栏高度
 
 
 
ClientRectangle//获取表示控件的工作区的矩形
 
 
MessageBox.Show(SystemInformation.PrimaryMonitorSize.ToString()); //获取主显示器屏幕的尺寸(像素)   
//获取主显示器当前当前视频模式的尺寸(以象素为单位)
 
MessageBox.Show("菜单栏高度"+SystemInformation.MenuHeight.ToString());  //获取标准菜单栏的高度   
   MessageBox.Show("标题栏高度"+SystemInformation.CaptionHeight.ToString()); //获取标准标题栏的高度   
 
 
 
MenuHeight//获取一个菜单行的高度(以象素为单位)
 
 
 
CaptionHeight//获取窗口的标准标题栏区域的高度(以象素为单位)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
  • 2021-11-14
相关资源
相似解决方案