不改private是肯定不能用你说的“this.Parent.控件名.控件属性名”的形式访问具体的方法是使用委托,即:子窗体声明一个委托事件;
在父窗体生成子窗体之后,为这个委托添加响应处理函数;
子窗体在需要操作父窗体控件的地方,引发该事件;

解决方案 »

  1.   

    1. 把主窗口作为参数传入对话框就可以了。
    2. 在主窗口中增加internal或者public的函数来修改特定的控件的特定属性。
    3. 在对话框中调用public或者internal的函数。
      

  2.   

    例如:
    子窗体:
    public delegate void SetCtlText(string sss);
    public event SetCtlText = null;父窗体:
    FormChild cForm = new FormChild();
    cForm.SetCtlText += new FormChild.SetCtlText(PSetText);private void SetText( string xxx)
    {
    this.button1.Text = xxx;
    }
      

  3.   

    子窗体在需要操作的地方写一个: public void MakeSetTextReady( string txt)
    {
    if(this.SetCtlText != null)
    {
    this.SetCtlText( "你的新字符串" );
    }
    }另外纠正一下上面手误:
    第4行:
    public event SetCtlText OnSetCtlText= null;第7行:
    cForm.OnSetCtlText += new FormChild.SetCtlText(PSetText);
      

  4.   

    窗体间传值
    http://www.z6688.com/info/35370-1.htm