Introduction:As the topic implies this little thang will allow you to add an identity to your FreeBASIC proggies.
What You'll Need:An icon image file .ico - A few are supplied to Transform your .exe's, see zip attachment.
A text editor Note Pad is just grand.
Optional: A paint package that allows the ability to churn out
.ico files or better still an icon editor.
Before We Start:By adding an icon it will increase your overall program file size.
I've supplied a zip archive of some icons for you to have a play with, there are a lot of freebies available if you search the web for them.
Also use icons in the size of 32 by 32. I've tried with bigger sizes but they get resized when the object file is created and your program is compiled.
Lettuce Begin:First of all save / copy and paste your icon into the program you wish to add the particular icon to, if you want to add it to your media / graphics folder than just remember to put the directory path into the icon file location.
Now open up Notepad or your prefered weapon of choice in the text editor department and type in the following:
fb_program_icon icon "name_of_icon.ico"
Nows time to navigate to
save, and select to save it as all types of files in the drop down menu, important this part, otherwize you'll be creating a text document rather than the actual type of file we need.
And call it a suitable name, for example
add_icon followed by a
dot rc and make sure you save it into your main programs root directory.
And Finally!In FBIDE -> View -> Settings -> FreeBASIC
Under Compiler Command in the tab along side your usual compiler settings, at the end enter in quotes "add_icon.rc" ( By the way same similar scenario with compiling on the command prompt )
And now OK it, when you next compile with F9 ( not F5 ) your program executable should now have a neat piccie applied!!
Extra Extra!:Ico FX - free icon utility and really awesome allows you to import your own images and apply settings to convert into icons. Thanks to Xone for posting the link in another thread.
Known IssuesIf you are using fbgfx lib then you will see a smaller icon on your windows title bar when not in full screen mode. However in TinyPTC / TinyPTC_Ext you will just have an icon applied to your exe.
Cheers and Happy Coding,
Clyde.