Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting access to bitmap in an ActiveX ImageList

Status
Not open for further replies.

Fred48

Programmer
Feb 23, 2004
62
US
I'm in the process of replacing ActiveX ToolBar / ImageList
with the Toolbar / ImageList provided with the VB .Net 2003. The Bitmaps that were used originally to populate the imagelist are nowhere to be found.

Is there a way to extract the bitmaps that are in the old ActiveX Imagelist back out to a .bmp file that can be used or to the new System.Windows.Forms.ImageList?

WayneSpangler, thanks for the help before. That routine worked, but it was for a VB 2003/2005 Imagelist. I have not been able to determine how to modify it for my Active X version of an imagelist.
 
The image list originated from VB 6.0 and was not converted during the migration to VB .Net 2003. The Active X Toolbar and associated image list still functions in the VB .Net 2003 / 2005 environment but its recommended to ultimately get your application into a pure VB .Net environment.

So, currently I have an Active X Toolbar & Imagelist and want to replace the Active X Toolbar and ImageList with the System.Windows.Forms objects. Unfortunately the Bitmaps for the images on the toolbar buttons are nowwhere to be found.
 
I don't remember what exacally what I answered before but I created an image list in vb6 and converted it to vb 2005. I added a button to the form and ran the following code to save all the images in the old activex image list. It works. If you want to see the images as they are converted then add a picturebox control to the form and uncomment the lines in the button click. Then delete the imagelist and toolbar activex and add the new ones.
Code:
        Dim bitmap As Bitmap = Nothing
        For i As Integer = 0 To ImageList1.Images.Count - 1
            bitmap = ImageList1.Images(i)
            bitmap.Save("Image" & CStr(i) & ".bmp")
            'PictureBox1.Image = bitmap.Clone
            'My.Application.DoEvents()
            'Threading.Thread.Sleep(1000)
        Next i
[\code]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top