use a static memberclass form1
{
   public static Form f;   // f=this;
}in form2, you can do form1.f;

解决方案 »

  1.   

    也不一定要Static的,
    class frmMain:System.winodws.forms
    {
    public string c="adf";
    public string showfrmSub()
    {
    frmSub fb=new frmSub();
    fb.f=this;
    return fb.get();
    }
    }class frmSub:System.winodws.forms
    {
    public frmMain f;
    public string get
    {
    return f.c;
    }
    }
      

  2.   

    两窗体之间的信息传输
    1.使用公共静态成员
    2。创建一个新的实例,调用它的公共或internal的非静态函数
      

  3.   

    //Form1中使用Form2的信息。
        private void button1_Click(object sender, System.EventArgs e)
        {
          Form2 f = new Form2( this );
          f.Show();
          
          int w = f.Width;
        }//Form2中使用Form1的信息。
      public class Form2 : System.Windows.Forms.Form
      {
        Form1 f1;
        public Form2( Form1 f )
        {
          InitializeComponent();      f1 = f;
        }    private void Form2_Load(object sender, System.EventArgs e)
        {
          int h = f1.Height;
        }
      }
      

  4.   

    不一定要使用静态成员,类的公共成员(PUBLIC)都市可以访问的
      

  5.   

    http://www.csdn.net/Develop/read_article.asp?id=26433
    http://www.csdn.net/Develop/read_article.asp?id=26434
    http://www.csdn.net/Develop/read_article.asp?id=26436