form1.cs

来自「微软(Microsoft)出版社C井练习文件及解答」· CS 代码 · 共 37 行

CS
37
字号
#region Using directives

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;

#endregion

namespace Properties
{
    partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            resize();
        }

        private void resize()
        {
            int w = this.Size.Width;
            width.Text = w.ToString();
            int h = this.Size.Height;
            height.Text = h.ToString();
            string s = string.Format("({0}, {1})", w, h);
            this.Text = s;
        }

        private void Form1_Resize(object sender, EventArgs e)
        {
            resize();
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?