Best icon techniques?

Just starting out? Need help? Post your questions and find answers here.
pthien
Enthusiast
Enthusiast
Posts: 148
Joined: Sun Jun 29, 2003 9:39 pm

Best icon techniques?

Post by pthien »

I've had trouble w/ icons in the past, so I thought I'd ask before venturing too far and hopefully get it right.

What size/parameters should I use for icons I add to my PureBasic programs so that they appear nicely under different circumstances?

I know, for example, that Windows XP will show icons at different sizes on your desktop than under explorer sometimes. The one on my desktop may look great, the slightly larger one Explorer generates looks grainy, etc.

And the same program on a Vista machine's desktop looks grainy too, because it has been resized.

Am I making my icons too small? Is there an optimum size to use? What program are you guys using to create icons (hopefully something freeware)?
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Best icon techniques?

Post by netmaestro »

Best is to use an icon file with a large icon and a small icon in it, this way the OS isn't resizing very far if at all.
BERESHEIT
criobot
User
User
Posts: 10
Joined: Sat Dec 27, 2008 9:42 pm
Location: Bulgaria
Contact:

Re: Best icon techniques?

Post by criobot »

IcoFX - Freeware icon editor, supports all kind of icons (including Vista's)
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: Best icon techniques?

Post by Rescator »

Another alternative is Greenfish Icon Editor Pro http://greenfish.xtreemhost.com/downloads.php
It's also free.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Best icon techniques?

Post by Trond »

Am I making my icons too small?
You need one icon for each size. At least do these sizes:
16x16 pixels
32x32 pixels
48x48 pixels
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Re: Best icon techniques?

Post by Edwin Knoppert »

>Best is to use an icon file with a large icon and a small icon in it, this way the OS isn't resizing very far if at all.

There is so much nonsense posted about icons already, please read msdn first ok..

http://msdn.microsoft.com/en-us/library/aa511280.aspx

There is so much more to icons, Windows tries not to stretch icons as long your icon file has the correct formats.
Since Vista there is the png embedded format as well, it's still an icon entry but with PNG image data and your resourcecompiler may not like it.
The latest SDK's offer a new MS RC.exe to allow png image data in icon files to be included.

Follow the guidelines and your icon file is ok.

Also the nonsense setclasslong() i see on this board to set the window icon should be banned once and for all.
This is no help, a window usually requires two imagesizes, for the caption and the ALT+TAB dialog and such.
I believe under Windows 7 even 3 formats, not sure, do read.

You can rapidly test your application's icons by using the zoom option in Windows 7 (Vista?) by clicking the desktop and then scroll + helding the CTRL key.
This shows all formats in your icon unless it can not find the correct size.

If you want to know more about Windows and how you should setup things google for:
"Windows User Experience Interaction Guidelines"

This is a 40MB+ pdf:
http://www.microsoft.com/downloads/en/d ... laylang=en
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Best icon techniques?

Post by Trond »

Also the nonsense setclasslong() i see on this board to set the window icon should be banned once and for all.
This is no help, a window usually requires two imagesizes, for the caption and the ALT+TAB dialog and such.
I believe under Windows 7 even 3 formats, not sure, do read.
The small icon is set with SetClassLong_(id, #GCL_HICONSM, icon) and the large (for ALT+TAB) with #GCL_HICON. There's no other way to set the window icon as far as I know.
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Re: Best icon techniques?

Post by Edwin Knoppert »

WM_SETICON

SetClassLong is for all forms using the same class, it ain't so bad if that is the intention but then it should be allowed to define this on forehand.
This api can only be used via an existing form and is contradicting the applications logic.
WM_SETICON is also for an existing form but intended to be used that way.
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Re: Best icon techniques?

Post by Edwin Knoppert »

On my website under downloads you can download iconbrowser.
It has a few icons and even with PNG format, this tool can show you what ~ you could support for sizes and resolution.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Best icon techniques?

Post by Vera »

Hi pthien,

have a look at these threads: Query on icons ~ Compiler not using icon for exe?

greetings ~ Vera
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Best icon techniques?

Post by netmaestro »

Well edwin, you'd know about nonsense.
BERESHEIT
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Re: Best icon techniques?

Post by Edwin Knoppert »

Oh no, another who's right discussion..
User avatar
PureLeo
Enthusiast
Enthusiast
Posts: 221
Joined: Fri Jan 29, 2010 1:05 pm
Location: Brazil

Re: Best icon techniques?

Post by PureLeo »

Your answer was just kinda rude. Everyone here is just trying to help.
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Re: Best icon techniques?

Post by Edwin Knoppert »

Doesn't matter anymore, Elvis has left the building.
If one needs to chat about this tool find me via my website.

Thanks,
Post Reply