I've upgraded a large VB6 app to VB.NET.
However, the VB6 ImageList doesn't upgrade to the .NET ImageList. That's fine - I'll just dump the same images to a new .NET ImageList. Easier said than done! I don't have the images anymore, just the old VB6 ImageList - how do I extract the images from a VB6 ImageList ?? The ImageList is working in .NET, but I need the images in a new .NET ImageList to associate with other .NET controls.
Here's the code I was trying to use to recover one image as a test, but the second line causes an exception:
Dim test As stdole.IPictureDisp = Me.MyVB6ImageList.ListImages(1).Picture
Dim testimage As System.Drawing.Image = VB6.IPictureDispToImage(test)
testimage.Save("C:\Temp\test", Imaging.ImageFormat.Bmp)
Anyone have any idea how to recover the images?
However, the VB6 ImageList doesn't upgrade to the .NET ImageList. That's fine - I'll just dump the same images to a new .NET ImageList. Easier said than done! I don't have the images anymore, just the old VB6 ImageList - how do I extract the images from a VB6 ImageList ?? The ImageList is working in .NET, but I need the images in a new .NET ImageList to associate with other .NET controls.
Here's the code I was trying to use to recover one image as a test, but the second line causes an exception:
Dim test As stdole.IPictureDisp = Me.MyVB6ImageList.ListImages(1).Picture
Dim testimage As System.Drawing.Image = VB6.IPictureDispToImage(test)
testimage.Save("C:\Temp\test", Imaging.ImageFormat.Bmp)
Anyone have any idea how to recover the images?