Icon problem

B

Bryan Dickerson

I have a set of icons that I used in a VB6 version of a program that I'm now
beginning to re-write in VB.Net (notice I said rewrite, not convert: I
really want to do it right this time...). Anywho, some of my icons are
8color, some are 16color and some are true color. VB.Net doesn't seem to
like my 16 and true color icons--I'm trying to use them in an imagelist for
toolbar icons. What am I not seeing?

TIA!
 
J

Jeremy Todd

Bryan Dickerson said:
I have a set of icons that I used in a VB6 version of a program that
I'm now beginning to re-write in VB.Net (notice I said rewrite, not
convert: I really want to do it right this time...). Anywho, some of
my icons are 8color, some are 16color and some are true color. VB.Net
doesn't seem to like my 16 and true color icons--I'm trying to use them
in an imagelist for toolbar icons. What am I not seeing?

When you say "doesn't like them," what do you mean? Does it throw an
exception when you try to load them into the ImageList, or do they look
funny, or...?

Since you're combining image types in the ImageList, make sure the
ImageList's ColorDepth property is set high enough to cover all of them
(e.g. Depth32Bit). If you try to load a truecolor image into an ImageList
set to Depth4bit, it will indeed look bad.

Jeremy
 
B

Bryan Dickerson

I set the ImageList colordepth to "Depth32bit". Then when I select an icon
from the File Dialog, it tells me "Invalid Parameter used."
 
J

Jesse Henderson

I was having the same problem. I ended up just saving the icons as
bitmaps and using them.

Jesse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Screen painting problem 2
Icon vs BitMap 2
Problem adding icons to imagelist 1
Icon Color Depth 4
Windows.Form shortcut Icon ?? 2
Icon Stash 3
ICON image 4
Issue in Listview control.. 4

Top