//1、在屏幕的右下角显示窗体
//这个区域不包括任务栏的
Rectangle ScreenArea = System.Windows.Forms.Screen.GetWorkingArea(this);
//这个区域包括任务栏,就是屏幕显示的物理范围
Rectangle ScreenArea = System.Windows.Forms.Screen.GetBounds(this);
int width1 = ScreenArea.Width; //屏幕宽度 int height1 = ScreenArea.Height; //屏幕高度
this.Location = new System.Drawing.Point(width1 - 窗体宽度, height1 - 窗体高度); //指定窗体显示在右下角
//2、在母窗体的中间显示子窗体的位置计算
waitForm.Location = new Point((this.Location.X + (this.Width - waitForm.Width) / 2),
(this.Location.Y + (this.Height - waitForm.Height) / 2));Web下:System.Web.HttpBrowserCapabilities hbc=new System.Web.HttpBrowserCapabilities(); Demo

Rectangle ScreenArea = Screen.GetWorkingArea(this);
this.Size = new Size(100,ScreenArea.Height);//设置为屏幕高度

C#获取屏幕的宽度和高度的更多相关文章

  1. android之获取屏幕的宽度和高度

    获取屏幕的宽度和高度: 方法一: //获取屏幕的宽度 public static int getScreenWidth(Context context) { WindowManager manager ...

  2. Java 获取屏幕的宽度和高度

    获取屏幕的宽度和高度 1 import java.awt.Dimension; 2 import java.awt.Toolkit; 3 4 public class Main { 5 6 publi ...

  3. JS,JQuery各种获取屏幕的宽度和高度

    JQuery: $(document).ready(function(){ alert($(window).height()); //浏览器当前窗口可视区域高度 alert($(document).h ...

  4. JS 获取屏幕的宽度和高度,各种方式

      Javascript: 网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document ...

  5. Android获取屏幕的宽度和高度(dp)

    public void getAndroiodScreenProperty() { WindowManager wm = (WindowManager) this.getSystemService(C ...

  6. JS,Jquery获取屏幕的宽度和高度

    Javascript: 网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document.b ...

  7. react native获取屏幕的宽度和高度

    var Dimensions = require('Dimensions'); var {width,height} = Dimensions.get("window");//第一 ...

  8. JS获取屏幕,浏览器窗口大小,网页高度宽度(实现代码)_javascript技巧_

    JS获取屏幕,浏览器窗口大小,网页高度宽度(实现代码)_javascript技巧_--HTML5中文学习网 http://www.html5cn.com.cn/shili/javascripts/79 ...

  9. react-native 获取组件的宽度和高度

    react-native 获取组件的尺寸有两种方式,第一种方式使用元素自身的onLayout属性去获取,但是这种方式有一个局限性,就是只有在初次渲染的时候才会触发这个函数,而且此种方法获取的是组件相对 ...

随机推荐

  1. Vue 前后台交互,插件

    目录 Vuex 插件 前端存储数据汇总 前后台交互方式(重点) axios 插件 同源策略-跨域问题 前后台分离项目交互流程 异步请求细节 Element-ui 插件 jQ + Bs插件 Django ...

  2. Linux--add the PPA to your system

    Add a PPA to your system with a single line in your terminal step1:on the PPA's overview page,look f ...

  3. Spark教程——(2)编写spark-submit测试Demo

    创建Maven项目: 填写Maven的pom文件如下: <?xml version="1.0" encoding="UTF-8"?> <pro ...

  4. Javascript调用本地数据库

    window.location.href = urls; // 本窗口打开下载 window.open(urls, '_blank'); // 新开窗口下载 (1)new ActiveXObject( ...

  5. FPGA流程设计

    做fpga也有四年时间了,该有个总结.刚开始那会,学习东西都是死记硬背,去面试也是直接带着答案去了. 时间久了,才懂得设计一些基本思路. 1. 设计输入: verilog代码和原理图.画原理图都是懒得 ...

  6. Link Analysis_1_Basic Elements

    1. Edge Attributes 1.1 Methods of category 1.1.1 Basic three categories in terms of number of layers ...

  7. oracle,mysql,SqlServer三种数据库的分页查询

    MySql: MySQL数据库实现分页比较简单,提供了 LIMIT函数.一般只需要直接写到sql语句后面就行了.LIMIT子 句可以用来限制由SELECT语句返回过来的数据数量,它有一个或两个参数,如 ...

  8. 终于解决ERROR: PHP's 'ldap' extension is not installed/enabled. Please check your MR

    我的系统是centos,php是yum的5.6.40,php-ldap也是yum的5.6.40,配置好ldap后,登录时提示ERROR: PHP's 'ldap' extension is not i ...

  9. day08-Python运维开发基础(文件操作与相关函数、函数基础)

    1. 文件操作及相关函数 # ### 文件操作 """ fp = open("文件名称",mode=模式,encoding=编码集) fp 文件io对 ...

  10. 南邮平台之Hello,RE!

    小白闲逛了一下南邮平台看到了逆向这题,小白在网上看了一下别人的write up发现有点复杂.于是小白就试试看,直接Underfine然后结果就出来了.....有点意外...... 结果flag{Wel ...