Henry手记-VB.net WinForm中的FORM初探(三)[2]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 latitude 的 blog

为了达到要求,应该添加自己的forms集合. 
添加一个新的module, 然后在module中写入: 
module formscollection
          public forms as new formscollectionclass() ‘类定义在后
end module
  添加一个类模块:

class formscollectionclass

implements ienumerable

implements 关键字用于对类成员实现特定接口进行界定。
为使用for each功能,要实现ienumerable接口,表示公开枚举数,
该枚举数支持在集合上进行简单迭代。

    private c as new collection()

collection 对象提供了一种将一组相关项作为一个对象进行引用的便捷方法。集合中的项

(或成员)只需要存在于集合中即可成为相关项。集合中的成员不需要具有相同的数据类型。

本文关键:vb.net Form
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top