为了达到要求,应该添加自己的forms集合. 添加一个新的module, 然后在module中写入: module formscollectionpublic forms as new formscollectionclass() ‘类定义在后
end module添加一个类模块:
class formscollectionclass
implements ienumerable
‘implements 关键字用于对类成员实现特定接口进行界定。
‘为使用for each功能,要实现ienumerable接口,表示公开枚举数,
该枚举数支持在集合上进行简单迭代。
private c as new collection()
‘collection 对象提供了一种将一组相关项作为一个对象进行引用的便捷方法。集合中的项
(或成员)只需要存在于集合中即可成为相关项。集合中的成员不需要具有相同的数据类型。