Form2继承Form1,但其所有控件属性全为不可选?Form1的访问性设为public也不行,应该怎么做?

解决方案 »

  1.   

    你要在Form2里重新设定这些控件的属性(用代码实现吧)
    如:
    Form1里有Label.text="China"
    Form2的构造方法里写Label1.text="中国"
    供你参考
      

  2.   

    Form1中所有控件默认是private的,到Form1.Designer.cs把类似这样的代码private System.Windows.Forms.Button button1;
    =====
    改为
    protected System.Windows.Forms.Button button1;
      

  3.   

    窗体上的控件都有一个 Modifiers 属性,只要不是private 或 internal ,继承的窗体Form2都可以修改该控件的属性。