this.Parent.父属性??

解决方案 »

  1.   

    C#: base.Property/base.MethodVB: MyBase.Property/MyBase.MethodC++: __super->Property/__super->Method
      

  2.   


    cuike519(marshal(修练中...)) 必须知道父控件的类型并做类型转换以后再使用它的属性!
    --------------------------------------------------------------------
    指定的转换无效。 
      

  3.   

    parent可以用啊,然后必须知道父控件的类型((Panel)Button1.parent).ToolTip = "我是Button1的父控件";
      

  4.   

    调试一下,看看parent是什么类型
      

  5.   

    这样啊,嘿嘿......if (this.Parent != null)
    {
        (this.Parent as SomeControl).SomeMethod/SomeProperty;
    }
    如此而已!前提是你知道这个Parent是SomeControl类型的,或是从SomeControl继承而来的子类才行.