我在树形视图中显示节点的图像,如下所示,为了实现这一点,在运行期间,我必须将图像文件保存在应用程序文件夹中,以满足以下情况,有没有方法将图像保存在类似于GAC的程序集位置?
Dim myImageList As ImageList = New ImageList()
myImageList.Images.Add(Image.FromFile("Tick.png"))
TreeView1.ImageList = myImageList
TreeView1.ImageIndex = 0发布于 2013-02-26 23:50:35
将它添加到资源中解决了我的问题。
Dim img As Image = CType(My.Resources.ResourceManager.GetObject("Tick.png"), Image)
myImageList.Images.Add(img)https://stackoverflow.com/questions/15092874
复制相似问题