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

namespace WindowsApplication1
{
    public partial class Form008 : Form
    {
        public Form008()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            tabControl1.SelectedIndex = 1;
            label11.Text = "姓名："+textBox1.Text+"；住址："+textBox2.Text+"电话："+textBox3.Text;
            textBox5.Focus();
        }
        /// <summary>
        /// 显示系统帮助信息
        /// </summary>
        /// <returns></returns>
        public string showmess()
        {
            string mess = "目前标签有" + tabControl1.RowCount.ToString() + "行，选择的页面是第：" + tabControl1.SelectedIndex.ToString() + "页，\n目前共有"+tabControl1.TabCount.ToString()+" 个页面，其中"+tabControl1.SelectedTab.ToString()+"。";
            return mess;
        }



        private void Form008_Load(object sender, EventArgs e)
        {
            label9.Text = showmess();
            textBox1.Focus();
        }

        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {
            label10.Text = showmess();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            tabControl1.SelectedIndex = 0;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}