我右键一个按钮,想弹出另一个Form2  这个时候我想在Form2中获取刚刚按下的那个按钮的Name属性求教各位

解决方案 »

  1.   

     Form1中:
           private void button1_Click(object sender, EventArgs e)
            {
                Form2 frm = new Form2(this.button1.Text);
                frm.Show();
            } Form2中:
            public Form2()
            {
                InitializeComponent();
            }        public Form2(string str)
            {
                InitializeComponent();
                this.label1.Text = str;
            }
      

  2.   

    给 form2 的构造函数传个参数就可以了~~