在窗体A中,如何引用窗体B的当前实例this

解决方案 »

  1.   

    this不能这样引用吧。写成静态的调用。
      

  2.   

    public Form1(Form2 f2)
            {
              InitializeComponent();    
              frm1 = this;
              frm2 = f2;                
            }        
        
            private void numericUpDown1_ValueChanged(object sender, EventArgs e)
            {
                frm2.change(this.numericUpDown1.Value.ToString(), frm1);              
            }
            private void Form1_Load(object sender, EventArgs e)
            {
                 frm2.Show();
                 this.numericUpDown1.Value = 0;                    
            }
      

  3.   

    http://topic.csdn.net/u/20090212/16/398553eb-c9f1-46b1-be04-714ee23428ea.html
      

  4.   

    也就是说,窗体A如何得到窗体B的当前实例,也就是窗体B当前的this