获取屏幕的长宽像素

  int xWidth = SystemInformation.PrimaryMonitorSize.Width;//获取显示器屏幕宽度
  int yHeight = SystemInformation.PrimaryMonitorSize.Height;//高度
  Button.Location = new Point(xWidth / 2, yHeight / 2 + 100); //设置按钮显示位置
posted @ 2022-03-08 17:19  码农阿亮  阅读(54)  评论(0编辑  收藏  举报