C# 中如何获得屏幕宽度和高度

来源:互联网 发布:我家门前有两棵树 知乎 编辑:程序博客网 时间:2024/05/01 13:21
Rectangle ScreenArea = System.Windows.Forms.Screen.GetWorkingArea(this);//
int width1 = ScreenArea.Width; //屏幕宽度 
int height1 = ScreenArea.Height; //屏幕高度
this.Location = new System.Drawing.Point(S_width - 窗体宽度, S_height - 窗体高度); //指定窗体显示在右下角
0 0
原创粉丝点击