NOTE: This tutorial requires at least MS-Windows 9x/ME/NT/2000/XP and FreeBASIC v0.12b (or newer) for Windows!


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!)
http://www.awicons.com/awicons.html

   IconoMaker (Aha-Soft; Freeware)
http://free-icon-editor.com/

   IconArt (ConWare Professional; Freeware; there is also a commercial version available, too!)
http://www.conware-pro.com/products/ia/

   IconForge (Trial Version)
http://www.cursorarts.com/ca_if.html

   SlavaSoft Paint Express (60-use Trial Version)
http://www.slavasoft.com/paintexpress/


AWicons Lite by Lokas Software is one of the most useful icon-creating programs that you can use to help you get started on getting the icon of your dreams right into your *next* big game, graphics demo, or what have you in FreeBASIC!!  ;-) !



  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).


What you want to do at this point is to save your Windows-based icon file with an extension type that is circled here, in the directory clearly specified in step #2 of this tutorial.



  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!!  ^_-


HERE IT IS, so get your new and freshly-baked icon while it is sizzlin’ hot!!  Let’s put it to some good use now, shall we?



  4.  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 you’ve created.



  5.  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.


For steps 1 through 6 so far: having followed all of them correctly in this example here, here now is our own test resource file for FB (circled in this screenshot), saved in the “bin\win32\res” directory where it is supposed to be.  ^_- !



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


Whew!!  Just compiled our test program for FB with our new custom icon, and BOOM, here it is!!!  My, all that hard work *finally* paid off after all, didn’t it?  ;-) !!





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.





S P E C I A L   T H A N K S   T O :
    • Almighty Jehovah God (first and foremost INDEED!!  d=^-^=b ! )
    • Andre Victor T. Vicentini (aka v1ctor) for creating FreeBASIC, the *absolute hottest* BASIC programming platform ever!!!
    • Richard Eric M. Lope (aka Relsoft) for inspiring me to do this very tute, so praise God for him, too!!  :D
    • Pete Berg of the online FreeBASIC/QuickBASIC magazine entitled QB Express.

G R E E T S   T O :
    • Wildcard (aka Brendan Urquhart)
    • Fling-master (aka Gered King)
    • Dav
    • Oracle
    • Angelo Mottola
    • Dark_prevail
    • Nekrophidius (aka Necros Ihsan Nodtveidt)
    • TheBigBasicQ
    • Na Than Assh Antti (aka Na_th_an)
    • Neo Deus Ex Machina
    • Aetherfox (aka Avinash Vora)
    • Dr_Davenstein
    • DrV
    • ShadowWolf
    • MystikShadows
    • Rattrapmax6 (aka Kevin of x.t.r.Graphics)
    • VonGodric
    • ......and ALL other members of the QBasicNews.com forums!!! ^_^=b