vb.net 2008为何会自动生成帮助中没有的类?
由6.0自动升级至.net 2008,因为有在MSHFlexgrid控件上画线的功能(用API画的,MoveToEx(hdc, tfx, tfy, a) : LineTo(hdc, ttx, tty)),转换后的代码就出来一个LineShapeArray.vb,代码开头部分如下:
Option Strict Off
Option Explicit Off
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic.Compatibility.VB6
Imports Microsoft.VisualBasic.PowerPacks
<ProvideProperty("Index", GetType(LineShape))> Friend Class LineShapeArray
Inherits BaseControlArray
Implements IExtenderProvider
这是自动生成的,可是编译器提示如下错误:
错误 4 未定义类型“LineShape”。 D:\My Documents\Visual Studio 2008\Projects\kx教学\LineShapeArray.vb 8 35 工程1
错误 11 未定义类型“ShapeContainer”。 D:\My Documents\Visual Studio 2008\Projects\kx教学\LineShapeArray.vb 50 25 工程1
错误 18 未定义类型“Microsoft.VisualBasic.PowerPacks.LineShape”。 D:\My Documents\Visual Studio 2008\Projects\kx教学\main.Designer.vb 131 32 工程1
错误 21 未定义类型“Microsoft.VisualBasic.PowerPacks.ShapeContainer”。 D:\My Documents\Visual Studio 2008\Projects\kx教学\main.Designer.vb 162 39 工程1
上帮助文件搜索lineshape、shapecontainer,一无所获。
怎么会这样呢?