2003里  
可以把  
public  class  UserControl1  :  System.Windows.Forms.UserControl  
 
改成  
public  class  UserControl1  :  System.Windows.Forms.Button    
 
但2005里不行啊。  
public  partial  class  UserControl1  :  UserControl  
 
改成  
public  partial  class  UserControl1  :  Button    
 
 
 
错误            1            “WindowsControlLibrary1.UserControl1”并不包含“AutoScaleMode”的定义            E:\VS.net\WindowsControlLibrary1\WindowsControlLibrary1\UserControl1.Designer.cs            32            18            WindowsControlLibrary1

解决方案 »

  1.   

    AutoScaleMode是新增的,对于Button来说没有这个属性,你直接把相应的代码去掉就可以了。
      

  2.   

    你没有定义AutoScaleMode,你继承了他就要有的东西去实现一下
      

  3.   

    public  partial  class  UserControl1  :  Button  
    写的对
    但是要定义一下AutoScaleMode吧.
      

  4.   

    还是不行去掉 InitializeComponent  里面的代码也不行。。总说XXXXXXXXXXXX
    WindowsControlLibrary1.dll”不包含任何 UserControl