Have you ever wondered how that famous FreeBASIC Horse icon was shown on certain FreeBASIC programs that got compiled to .EXE format? Hey, better yet, ever wanted to have YOUR VERY OWN icon attached to the .EXE of your own compiled FB proggie? Well, this original tutorial presented by yours truly will *definitely* answer you these two burning questions and even make your wildest dreams come true in the process, all within the subject of what I am talking about right here! ^_^ !
To master this, please pay VERY close and careful attention now to the following steps that I will give you:
1. Grab yourself an icon editor that can help you produce your own original .ICO files! Such examples of them include:
AWicons (Lokas Software; Lite version is freeware only!)
IconoMaker (Aha-Soft; Freeware)
IconArt (ConWare Professional; Freeware; there is also a commercial version available, too!)
IconForge (Trial Version)
SlavaSoft Paint Express (60-use Trial Version)
2. After you create your brand-new icon using your favorite icon/paint editor, be sure to save that thing as an .ICO file and place it into the bin\win32\res directory within the main directory where FreeBASIC is located (ie C:\FreeBASIC\bin\win32\res).
3. After saving, please check the bin\win32\res directory within the main directory where FreeBASIC is located (ie C:\FreeBASIC\bin\win32\res). There, your new .ICO file should be already up right now if you have steps 1 and 2 correct so far!! ^_-
Next, open up the text editor of your desire (such as WordPad or Notepad), and create your own new FB resource file that points to the *exact* location of the icon that youve created.
When done, select Save As... (or anything like that). Make sure you are at the bin\win32\res directory within the main directory where FreeBASIC is located (ie
C:\FreeBASIC\bin\win32\res) and type in any filename you want there. But remember now, since we are gonna be saving an FB resource file indeed, be
sure also to include an .RC extension at the end and *not* a .TXT extension there, please!
Then, click Save when you are all good to go!! ^^
6. Your FB resource file with an .RC extension should come up in the bin\win32\res directory portion of FreeBASIC indeed!! :D If not, then repeat the procedure from step #3 to make sure, please.
To compile your FreeBASIC program to .EXE format *with* your own brand-new icon attached to it, in the command-line (or at the DOS prompt), try typing in the following:
fbc anyresource.rc -s gui anyprogram.bas
......whereas the anyresource portion is talking about the target filename of an FB resource file, and the anyprogram portion is talking about the target filename of your FB source code, too. Both of these portions may require you as well to type in the exact directory/path as to where they are located, so do be cautious here.
NOTE: You can even create a custom batch file (.BAT) based on what I have just said in this step to help make things a little easier, too! ^-^
8. If your own icon is *successfully* attached to the .EXE of your compiled FreeBASIC program, CONGRATULATIONS TO YOU!!! d=^_^=b !! If the icon does not appear in that .EXE there, then please review step 7 again.
Once you learn how to do them all within this tute, then you are SURE to be ready to set up your custom Windows-based icons to be attached to your own FB-compiled programs just like a *real* pro!!! Hey, it may not always be perfect, BUT at least all eight (8) steps that I gave you will work if you just do em right, I will tell you! COME ON, GIVE IT A SPIN AND SEE!!! (^_-)v !
Well, here ends my _very_ first official tutorial that I have ever written and prepared, and PRAISE GOD ALMIGHTY that He is the only One that has first and *surely* enabled and empowered me to do all of that, just to be an extra special blessing to the whole entire QB45/QB71/FreeBASIC community (and also to YOU, the FreeBASIC programmer!!) on purpose now! I HOPE YOU ENJOYED IT AS WELL AS EVER, SO THANK YOU RICHLY WITH ALL OF MY HEART FOR YOUR WONDERFUL TIME!!! Bye-bye for now!! ^_-=b !
From the words of Adigun Azikiwe Polack, the original author of this official tutorial for FreeBASIC.