Page 1 of 1

Window icon in source code

Posted: Mon Oct 11, 2010 11:11 am
by rotacak
Hi, is there any way how to include icon in exe? I want to distribute only one file (exe), not two files (exe, icon).

It is somewhat possible?

Re: Window icon in source code

Posted: Mon Oct 11, 2010 11:20 am
by tomijan
Hi,
Use checkbox "Use icon " In Compiler options and choose icon file.
tom

Re: Window icon in source code

Posted: Mon Oct 11, 2010 11:24 am
by rotacak
I was trought that icon need be inclued near exe even in this case, but seems no. Maybe it was in older version of Purebasic. Ok, thanx.

Re: Window icon in source code

Posted: Mon Oct 11, 2010 11:28 am
by dongnanyanhai
Hi.
By setting the compiler's resource options you can include as many Resource scripts as you want.The resources will be compiled and included with the executable.

Re: Window icon in source code

Posted: Mon Oct 11, 2010 12:43 pm
by rotacak
But how to create .rc files and how to access them?

With that ico I have one problem. When I use 64x64px icon, then small version (16x16) is ugly. Is possible to add more icons with different sizes?

Re: Window icon in source code

Posted: Mon Oct 11, 2010 12:58 pm
by cas
You only need to make more versions of your icon at different sizes (16x16,32x32,48x48,64x64, or whatever you like) and then combine all icons in one .ico file and then use that combined .ico file in PureBasic compiler options. I do it with this program:
But you can find alternatives here on forum, i think netmaestro posted some code for doing same thing in PureBasic (this program above is written in .Net)...

Re: Window icon in source code

Posted: Tue Oct 12, 2010 2:08 am
by dongnanyanhai
You can create your ico file by using this program:Axialis IconWorkshop.
And then find Resources help from the PureBasic.CHM file or open this url : http://www.purearea.net/pb/english/manu ... piler.html

Sorry for my English.