Ayenoy Posted April 16, 2004 Posted April 16, 2004 Hi. I been searching for almost a week straighht looking for a way for my icons to show up right on my toolbar. I got my icons from "http://www.foood.net" and added it to a ImageList which is linked to the Toolbar control. However the shaded area or shadows does not show right instead has a very ugly black border and the Icon edge is very edgy and not smooth like how it should be. I found article that mentions that it is the alpha-blending but no code or help. This is really frustrating. Any help please. I am doing this on VB.NET. Thanks. Ayenoy Quote
Liqdfire Posted April 16, 2004 Posted April 16, 2004 Hi. I been searching for almost a week straighht looking for a way for my icons to show up right on my toolbar. I got my icons from "http://www.foood.net" and added it to a ImageList which is linked to the Toolbar control. However the shaded area or shadows does not show right instead has a very ugly black border and the Icon edge is very edgy and not smooth like how it should be. I found article that mentions that it is the alpha-blending but no code or help. This is really frustrating. Any help please. I am doing this on VB.NET. Thanks. Ayenoy what you need is the original .png file from Foood but you have to license the icon from him to use it. Quote
Ayenoy Posted April 16, 2004 Author Posted April 16, 2004 Fooood.net icon was just an example of the type of icon that i will be using. I am planning maybe to create my own or purchase a license agreement. The .icon shows up find until i insert it anywhere in my form using Imagelist, Picture control, Menu, etc. The shadow will not show right and just gives a black border as shown in the link below. http://www.origin2k.com/pic.htm Thanks you all. Quote
Ayenoy Posted April 16, 2004 Author Posted April 16, 2004 The second image is the way it should look on the form or when i use it as my desktop icon. Quote
Liqdfire Posted April 17, 2004 Posted April 17, 2004 The second image is the way it should look on the form or when i use it as my desktop icon. I think you would be better off using a .png file instead of a .ico file and doing the drawing of the control manually let me see if I can find a example that will help you out Quote
Ayenoy Posted April 17, 2004 Author Posted April 17, 2004 If you can find some codes thatll be great. Thanks a lot for the help. In the meantime I will try to make some algorithm for it. Chanthone Quote
sjn78 Posted April 18, 2004 Posted April 18, 2004 This is what I have found with Icons in VB.Net. Your application Icon can be one from Foood, they are generally larger icons (48, 48) and they use the WinXP colour range. These icons show up perfectly when your program runs. But when you use one of them in toolbars, you will have troubles. Toolbar icons need to be 256 colour icons and when you add them in your image list, the image size specified in the imagelist must be the same size as your icon, otherwise you get your black edges. So, for your problem, get an icon editor and save any Foood ones that you get, (better check with Foood that you can do this legally), to 256 colours and to whatever size you plan on using them. This is a pain especially for customising your appearance, ie, small icons or large icons, you need 2 image lists - 1 for each icon size you may use. By the way, I use VB.Net 2002, not sure if its been fixed in 2003. Quote
vbnetguy21 Posted May 10, 2004 Posted May 10, 2004 Final note? I was having the same problem and found as mentioned that if you use ICO files they should be 256 colour. If you want the smoother looking icons then you should use PNG files. If you have Axialis Icon Workshop you can easily turn your icons into PNG files. The 256 colour icon limitation does not appear to be "fixed" in the latest version. Maybe in VS 2005 due out. It would most likely require a major upgrade to the imagelist container that would not have been accomplished between 2002 and 2003. Quote
NicoVB Posted May 10, 2004 Posted May 10, 2004 I had the same problem at that point, so I created a control myself called an IconBox control... If you set the property Image of it to the icon... it all goes right!!! the key to the control is that Graphics.DrawIcon(...) will draw the icon unblurred 32-bit XP quality!! try and see the result! nico Quote Visit http://www.nico.gotdns.com Now ONLINE!
Liqdfire Posted May 10, 2004 Posted May 10, 2004 I had the same problem at that point, so I created a control myself called an IconBox control... If you set the property Image of it to the icon... it all goes right!!! the key to the control is that Graphics.DrawIcon(...) will draw the icon unblurred 32-bit XP quality!! try and see the result! nico sounds interesting would you be willing to post the code ? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.