zoukankan      html  css  js  c++  java
  • Windows属性

    /*
     * 用户: NAMEJR
     * 日期: 2019/8/22
     * 时间: 22:42
     */
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Windows.Forms;
    
    namespace SP
    {
        public partial class MainForm : Form
        {
            public MainForm()
            {
                InitializeComponent();
            }
            
            void MainFormLoad(object sender, EventArgs e)
            {
                Rectangle ScreenSize = System.Windows.Forms.Screen.GetWorkingArea(this);  // 获取屏幕宽度(不包括状态栏)
                Rectangle ScreenSize2 = System.Windows.Forms.Screen.GetBounds(this);  // 获取屏幕宽度(包括状态栏)
                int width = ScreenSize2.Width;  // 获取屏幕宽度
                int height = ScreenSize2.Height;  // 获取屏幕高度
                this.Location= new Point(0,0);  // 定位
                this.Size = new Size(ScreenSize.Width,ScreenSize.Height);  // 设置当前窗体的大小
            }
        }
    }

    //

  • 相关阅读:
    linux中read用法
    apt-get 使用指南
    linux文件系统
    KMP
    在C#中的各种应用
    A*算法,遗传算法
    Dijkstra算法,Floyd算法
    AE开发tips
    TOC 右键菜单
    ubuntu下的一些意外
  • 原文地址:https://www.cnblogs.com/namejr/p/11403733.html
Copyright © 2011-2022 走看看