|
-
Apr 18th, 2006, 12:52 PM
#1
Thread Starter
Member
[2.0] Strange bug with the imagelist control?
There is a weird display issue with the imagelist control...
Step 1) I setup an image list to store 32bit icons. I added each icon to the imagelist, as an ico file.
Step 2A) In code, I linked the image to a context menu item.
Step 2B) In code, I linked the image to a picture box.
Code:
contextMenuStrip1.ImageList = imageList1;
toolStripMenuItem1.ImageIndex = 0;
pictureBox1.Image = imageList1.Images[0];
Code is straight forward, nothing fancy. I used both a context menu and picture box to make sure the problem wasn't tied into the context menu directly.
Step 3) Everything looks normal, compile the program, and it looks normal as well.
Step 4) Close VS 2005
Step 5) Open VS 2005
Step 6) Run program
Step 7) Enjoy your icons looking mangled, as if they are being stripped down to a lesser color depth.
Step 8) Remove all the icons from the imagelist, and re-add them.
Step 9) Enjoy your icons in all their glory.
Any idea how to fix this or get around it? Has anyone else experienced this?
-
Apr 18th, 2006, 02:56 PM
#2
Thread Starter
Member
Re: [2.0] Strange bug with the imagelist control?
Hmm, I converted all my icons to PNG, and now they are all normal. Guess the bug is related to ICO files in an image list.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|