vb,急救!用变量保存图片,控件可以调用变量

来源:百度知道 编辑:UC知道 时间:2024/05/15 07:09:34
vb如何用数组保存许多图片,控件可以调用数组中的一个,达到显示该图片的目的。
比如:a(n)form.picture
image1.picture=:a(n)

在工具箱里点右键,部件,勾选Microsoft Windows Common Control 6.0,关闭。在工具箱中就会出现ImageList控件,在窗体中添加ImageList控件,在其上点右键,属性,即可添加图片。
image1.picture = imagelist1.ListImages(index).Picture 就可以显示索引为index的图片。