Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, June 23, 2009 4:39 PM
hi there,
I downloaded a sample tool which contains an ImageList component.
When I click on properties of this ImageList component I see 3 images which I am trying to save it to disk so that I can use it in another control. Not sure how I can get them. If I ckick "Add" member I can see various formats such as bmp or gif but in the source code I dont see any images.
Can you help?
Thank you.
JCDS
All replies (4)
Tuesday, June 30, 2009 8:16 AM âś…Answered | 2 votes
Hi,
Is the tool a managed application?
Please try the code bellow:
Bitmap b = new Bitmap(this.imageList1.Images[0]);
b.Save("1.bmp");
Then other images can be aquired through different index.
I assume the name of the imagelist is imageList1.
HarryPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Tuesday, June 23, 2009 5:54 PM
Look up the type in the Object Browser Window to see all of the members for the type.
The Forms.ImageList class contains an Images property which is a collection of type ImageListCollection.
Look that one up, too. Are you familiar with the type List<T>?
Mark the best replies as answers. "Fooling computers since 1971."
Tuesday, June 23, 2009 11:36 PM
yes i am familiar with the type List<T>. I think that is like a dictionary. Sorry beginner here.
I am not sure how to save those images into a bmp file though
thanksJCDS
Tuesday, June 30, 2009 2:45 PM
that is exactly what I needed!
Thank you Harry!!!!
JCDS