
图2
5、 在类模块class1中,我们写如下代码将相应的资源导出。
public function loadres(resid as integer, imgtype as integer) as ipicturedisp
set loadres = loadrespicture(resid, imgtype)
end function
其中:参数resid为资源号,imgtype为图片类型(位图、图标或光标),这两个参数传入loadrespicture()函数,下面,对loadrespicture()简单讲解。
语法:
loadrespicture(index as integer, format as integer) as ipicturedisp
参数:
index: 必需的。一个整数或字符串,它用来指定资源文件中数据的标识符 (id) 。id标识符为 1 的资源保留给应用程序的图标。
format: 必需的。一个数值或常数,如下列“设置值”中所描述的,指定返回数据的格式: