未定义类型
自定义windows窗体控件中修改设计器添加代码,IDE提示windows.forms.design.controldesigner未定义,请问是什么原因?关键代码如下:
Imports System.ComponentModel
Imports System.ComponentModel.Design
imports system.windows.forms.design
<Designer(GetType(MyControlDesigner ))> _
Public Class myTextboxVE
Inherits System.Windows.Forms.TextBox
...
end class
Public Class MyControlDesigner : Inherits System.Windows.Forms.Design.ControlDesigner
...
end class
[解决办法]
在项目-添加引用,添加对System.Designer.dll的引用。