⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form2.cs

📁 Visual C#2005程序设计教程
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WinApp8_1求数组元素最大值
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void Form2_Activated(object sender, EventArgs e)
        {
            txtInput.Text = "";   // 清空文本框内容
            txtInput.Focus();   // 文本框获取输入焦点
            lblInfo.Text = "请输入第" + (Form1.i + 1) + "个数:";   // 提示输入数据
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form1.a[Form1.i] = int.Parse(txtInput.Text);   // 数组下标为i的元素获取当前文本框的值
            //this.Close();   // 关闭f2窗体返回到主窗体
        }
    }
}

⌨️ 快捷键说明

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