I want to pass an image in a picture box to a certain position on an image list. Does anyone know how to this?

I tried:

imagelist1.images(0)=picturebox1.image

But this is read only, what can i use to accomplish this?

Thanks, NtheN

I would suggest to create a new, temporary imagelist.
Then, use the add function to insert the images from your image list until the point you want to insert/replace the old one.
Add the new one from your pinture box to the new imagelist, skip one from the old if replacing, and continue to add from the old to the new one.
Finally, set the old image list to be the new one

Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.