Skip to main content
 首页 » 编程设计

C#如何控制panel加载的字窗体中控件的位置随着显示器分辨率大小而改变

2022年07月19日152bluestorm

System.Windows.Forms.Screen   screen=Screen.PrimaryScreen;  
  System.Drawing.Rectangle   rct=screen.Bounds;  
  //rct.Height.ToString();//高度  
  //rct.Width.ToString();//宽度

以上是取分辨率代码.
然后根据rct的值,按你的想法计算出每个空间的Location值就可以了


本文参考链接:https://www.cnblogs.com/xihong2014/p/10867349.html