【发布时间】:2010-07-22 19:55:17
【问题描述】:
我有一个图像列表,并想在我的代码中将图像目录添加到图像列表中。我该怎么做?当我运行代码时:
'Load all of the items from the imagelist
For Each path As String In Directory.GetFiles("Images\LanguageIcons\")
imlLanguagesIcons.Images.Add(Image.FromFile(path))
Next
我收到内存不足异常。目前只有 14 张图片,所以应该没有问题。有什么帮助吗?
【问题讨论】: