How to create an Icon image file

Hi team,

I have been trying to create an icon file for my new project. But I have been totally unsuccessful and I am confused. Since I have never done this before I must ask the question that is probably obvious to everyone else. What makes an Icon file an Icon I know that it has an extension of .ico but there is more to it than renaming a 32 x 32 pixel bmp to an .ico. Is it the size Some internal header data

When I try and add a resource with the type "Icon", I select my image file but it gets imported into the "Images" area and not the one for Icons. I have tried jpg's, bmp's and gifs to to avail.

The form property for Icon says that the size is 32 x 32 pixels. I created a cute little 32 x 32 image in photoshop and saved it as a bmp. (ie cutelittle.bmp) I could not use it in this format. I renamed it cutelittle.bmp to cutelittle.ico. I was pretty sure that would not work and it didn't.

Can someone please tell me how I can create an image that will satisfy the properties of an ICON so I could use it. When I try to use is as instructed by other posts here, I get an error message.

Me.Icon = My.Resources.cutelittle returns me "Value of type 'System.Drawing.Bitmap cannot be converted to System.Drawing.Icon' "

Thanks,

Gary



Answer this question

How to create an Icon image file

  • aaronp

    Lydon wrote:
    True, True, it can be hard to get used to. But, you can check out GimpShop (http://blog.yumdap.net/archives/20-GIMPshop-for-Windows.html) it is pretty much the GiMP that someone has switched up a little bit so that the UI is more like (Apparently very close to the same as) PhotoShop. I haven't tried it, but there seems to be a big buzz about it.

    cool! i will try this at home (cuz my uncle only has a mac mini.. grmbl)



  • Chandra B

    Thanks Renee, this was a great tip. I found the site, plopped down my 5, learned a little bit, got 100 worth of education. Nice plug in so I just "Save As" ico and poof. Thanks alot.

    Gary


  • RonDesta

    Look around on the net..... Google for ICO + Photoshop

    There is an Australian who makes a free Icon converter plugin for photoshop.

    It's really good and if you have it, he'd look a five dollar donation for his fine work.

    I use the converter quite frequently and it's really nice.



  • Pankaj Kumar Sharma

    Why isn't it easier to make an icon! what is so special all it should be is an 32x32 pic is there something i can make using vbexpress to turn any paint made file into an ico


  • kenc2005

    the Gimp is cool, but i doesnt like the user interface.. but the 2.x is much better than 1.2.x

  • JohnFromOz

    Hi Jan,

    I found my problem, when you open your project page from the VB IDE there is a place where you can assign an icon file to the application. When I did this and re-published/re-installed, my Icon was established and displayed whenever application identification was appropriate. After loading it was in the start menu, and when I went to start/all programs/"my company"/"my app" it appeared there as well.

    Thanks for the interest.

    Gary


  • GianniAb

     

     

    Jeri,

    I don't know. I wish I could answer your question but I've never played with this.

    To me, icons are nice but I don't pay a whole lot of attention to them.



  • Discoman

    hmm i want to install PS soon, too.. does this converter support various icon sizes / colordepths in one file

  • InvertedAerials

    Just as an aside....

    If anyone out there doesn't own PhotoShop, the GIMP (www.gimp.org) is a great open source alternative. It's a little tough to get used to, but it has inherent support for .ico files. Just create an image and save it as <name>.ico and you'll be ready to roll.

  • Andrewssi

    True, True, it can be hard to get used to. But, you can check out GimpShop (http://blog.yumdap.net/archives/20-GIMPshop-for-Windows.html) it is pretty much the GiMP that someone has switched up a little bit so that the UI is more like (Apparently very close to the same as) PhotoShop. I haven't tried it, but there seems to be a big buzz about it.

  • chaser7016

    OK, no problem :)

    At home, i use Microangelo to create icons.. it also offers a function to import .psd-files..

    (i am a kiddie. i like drawing n playing around with this stuff )



  • CHTHONIC

    Hi Jeric,

    I am very new to ICON making, and just learned that there are different levels sizes etc. in a single ico file. From what I can tell from the documentation, it makes a windows icon that consists of several different layers and sizes so that if a user is using "large icons" as a windows display option, it behaves accordingly. But I think all of the internal images are displayed at an 8bit depth with 1 bit used for transparency.

    The download is a plugin that when placed in the file format folder of photoshop, (I used elements 2.0) produces a save as option for type ico in your save as dialog box. I created an image sized 32 x 32 pixels because of the VB2005express Form option for Icon has size properties of 32 x 32. So I simply loaded the output ico file from my new plugin, (imported into my resources) and then did a simple assignment statement in the Form Load subroutine of each of my different forms and I had instant icons. Me.Formname.Icon = My.Resources.myicon

    Caviat and further questions. I have 2 machines, one I develop on and then install and test on the other. I installed a program with no icons specified and it supplied a default icon from windows for a file of type program. The installer placed it under the Start/All Programs/ myownerdirectory name/ my program name and left a 1K pointer file to the exe or dll I do not know which, as some new type of shortcut file. I do not know where my little program is (could not find it with search) but I am suspecting that it was packaged in with the redistributible - which is pretty cool)

    I uninstalled it to reinstall with the new Icons in place and that went fine. After re-installing, the progamming and all of the forms contained my new Icon, but the pointer under Start/ All Programs / MyFolder / My Program was still using the default Icon, and the icon placed in the Start display (recently used programs) was also using the old default icon. I do not know if this is because It was previously installed or whether there are other places inside of VB Exp that I have change to point to my icon file.

    Good luck on your endevors ... keep coding.

    Gary


  • mehmet bey

    hmm, i dont know if this is because of your previous installed version.. :(

    and the color depths:

    windows xp adds a new icon format, which allows 32-bit-color with 8-bit-transparency, and this format is backward compatible, so these icon-files are displayed under other operating systems.. the only problem i had with those new icons is that i wasnt able to use them as an application icon in vb6.

    have a nice day :)

    Jan



  • THHNO

    You're very welcome gary !!!!!



  • How to create an Icon image file