左边的Tab Control控件的点击事件做一个Event事件抛到主界面。再用主界面去实现右边部分的变化。

解决方案 »

  1.   

    FormB写个委托    在FormA中new FormB的时候注册委托  然后将FormA中的trreeview数据回调过去
      

  2.   

    能不能具体介绍一下又看了遍你的问题,你只是想在FormB的treeview中显示和FormA的treeview中一样的数据,你formA中treeview的数据从哪来的,怎么绑定的,你formB就照样搞啊 , 不存在传值问题
      

  3.   

    最终都在Form呈现了,所以可以直接在Form中操作
      

  4.   

    如何修改继承窗体中的控件属性
    //主窗体
      private void InitializeComponent()
            {
                this.button1 = new System.Windows.Forms.Button();
                this.SuspendLayout();
                this.button1.Location = new System.Drawing.Point(68, 15);
                this.button1.Name = "button1";
                this.button1.Size = new System.Drawing.Size(103, 33);
                this.button1.TabIndex = 0;
                this.button1.Text = "主窗体";
                this.button1.UseVisualStyleBackColor = true;
                // 
                // Frm_Main
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(246, 66);
                this.Controls.Add(this.button1);
                this.Name = "Frm_Main";
                this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                this.Text = "修改继承窗体中的控件属性";
                this.ResumeLayout(false);        }
    //继承的窗体
     private void InitializeComponent()
            {
                this.SuspendLayout();
                this.button1.Text = "被继承的窗体";
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
                this.ClientSize = new System.Drawing.Size(246, 66);
                this.Name = "Frm_Inherit";
                this.Text = "继承窗体";
                this.ResumeLayout(false);        }