AutoScaleMode属于ContainerControl的属性,而Panel 继承自 ScrollableControl,ScrollableControl是不包含AutoScaleMode属性的

解决方案 »

  1.   

    VB.Net里的是这样的
    Inherits System.Windows.Forms.Panel '继承
    希望对你有用
      

  2.   

    查看InitializeComponent()方法的定义,把
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    删掉,这是生成控件时候系统自动添加的,但是Panel类貌似不支持这个属性
      

  3.   

    一般生成新控件时会VS2008会生成两个*.cs文件,UserControl1.cs和UserControl1.Designer.cs,它们各起什么作用?
      

  4.   

    UserControl1.Designer.cs是窗体文件,UserControl1.cs是写代码的地方
      

  5.   

    自己把 用户控件 和自定义控件 搞混淆了 是新建自定义控件  而不是 用户控件  用户控件只能 继承 UserControl