Window icon in source code

Just starting out? Need help? Post your questions and find answers here.
rotacak
User
User
Posts: 77
Joined: Tue Feb 14, 2006 2:00 pm

Window icon in source code

Post 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?
tomijan
Enthusiast
Enthusiast
Posts: 107
Joined: Sun Dec 11, 2005 1:32 pm

Re: Window icon in source code

Post by tomijan »

Hi,
Use checkbox "Use icon " In Compiler options and choose icon file.
tom
registered user
rotacak
User
User
Posts: 77
Joined: Tue Feb 14, 2006 2:00 pm

Re: Window icon in source code

Post 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.
dongnanyanhai
User
User
Posts: 10
Joined: Thu Aug 05, 2010 4:15 pm

Re: Window icon in source code

Post 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.
rotacak
User
User
Posts: 77
Joined: Tue Feb 14, 2006 2:00 pm

Re: Window icon in source code

Post 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?
cas
Enthusiast
Enthusiast
Posts: 597
Joined: Mon Nov 03, 2008 9:56 pm

Re: Window icon in source code

Post 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)...
dongnanyanhai
User
User
Posts: 10
Joined: Thu Aug 05, 2010 4:15 pm

Re: Window icon in source code

Post 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.
Post Reply