Preface
This article will help you figure out how to use any icon up to 128x128 for your game/app with full 32-Bit windows XP alpha transparency.
The article is written for VB 6, which isnt free. But if you can find any other programming language/dev environment that can do similar, it shouldnt take much to convert.
Background
If you plan on making a professional application, a good quality icon helps a lot. But MMF (Or jama afaik) will keep you down to 256 Colour and 32x32, something thats always annoyed me. Well; With a little ingenuity and very very little coding (copy and paste if you like) you can have a nice high colour/res icon for your game/app (yes games can have it too )
Above - Old crappy MMF made icon for iPublish.
First of all...
When building your final game/app instead of making it .exe wrap the output filename in quotes and use .dll at the end (or dat, bobby, etc. thats up to you) this will obscurificate the actual exe (with the crappy MMF icon)
Note: Be sure to update any references to these files by external exe's.
Secondly...
Now that youve made your main exes harder to execute (custom file exts) its time to open VB. Create a new standard exe.
Now that thats done, add the following code on form_load (Create the form load bit by double clicking the blank form)
Add this code:
Private Sub Form_Load()
Shell App.Path & \data\ipb.dll, vbMaximizedFocus
Unload Me
End Sub
The Shell function is similar to MMF's Run an external application but it has different parameters. The first one is self explanitory however.
App.Path + \data\ipb.dll
This section executes the fake dll file i compiled (app.path is just like appdrive$ + appdir$, be sure to start the path with a \ though).
vbMaximizedFocus
The default startup mode for the exe.
Unload Me
Will quit your loader once its executed the shell command.
Build the test loader
First of all, save the project and accompanying form and then click File -> Make *appname*.exe set a filename and compile it to whever your data files are (or the folder above in iPublishes case.
And hopefully...
The app should run, if not. Check the path settings.
Making the icons
Now, use your favourite app to make the icons (if you want to do alpha ones; Photoshop, Paint Shop pro or Macromedia Fireworks are reccommended) and set up a 48x48 canvas (transparent background) once this is done. Start making your icon (i shouldnt need to guide you through that)
Creating the .ico
Once your icon is done, export it as a 32 big PNG file. Then, use an icon creator package (this example will use axialis icon workshop, not cheap, but there are many freeware ones) import your PNG (good icon packagers will read the alpha bits and allow you to auto scale into other formats.
Once your import has been done successfully, ensure that you create the following icon formats to be compatible for all PC's
16x16 - 8 Bit
24x24 - 8 Bit
32x32 - 8 Bit
48x48 - 8 Bit
The same for: 16 Bit, 24 Bit and 32 Bit (32 bit only if you are doing alpha blending)
Once this is done, the ico should be an all in one file (with all formats stored within it)
Putting into your loader
Once the icon creation is all done, its time to give your VB app the icon.
Select your main form and scroll down the properties panel until you reach a property entitled icon
Browse for the saved icon, and then click ok.
Youre done!
Just re compile the exe and place it in the same place the test version was built.
As VB is pretty optimized, it'll only add between 30 and 80kb to the total MMF project size.
Above - The happy new iPublish loader.
Extra advantages of this:
You can also play with the versions and file descriptions without violating your MMF license
If you dont have the tools or the time to make this, dont hesitate to dcmail me if you want a nice icon setup done and compiled for you (you can provide your own gfx if you wish) but i'll only do this for apps that are 99% done or complete
Kris: I find resource hacking the MMF exe gives all sorts of errors when attempting to inject anything above the standard set of icons. Plus, this method does not violate any of the MMF licence things (reshacking does)
Whoops lol, andos just found an error for me. Change the entire load code to this:
Private Sub Form_Load()
Shell App.Path & \data\ipb.dll, vbMaximizedFocus
Unload Me
End Sub
On certain OSes (Windows 98 etc.) it'll generate an overflow error. This was because i was holding the return type (Which is a double/decimal) in an integer (Whole number). Ive also changed the "+" to a "&" to properly join the strings in VB.
"But MMF (Or jama afaik) will keep you down to 256 Colour and 32x32, something thats always annoyed me."
I thought that's what MMF Pro and Jamagic were for?
BTW. Jamagic supports 32bit icons. I just tested it, and they all work fine. It doesn't support alpha-transparency though. If your icon doesn't match the output size, Jamagic will automatically scale it for the output. An example is an 8x8 image being scaled to the 32x32 icon, or a 1024x1024 image being scaled to a 32x32 icon(unless someone has "magnifying glass" on for their computer. Then they'd see a resized 256x256 icon. )
Great article! I will use this in every game I make!
I downloaded an icon maker soon after reading this (ArtIcons Pro) which is fairly good, but I was too tight to pay the £15 to keep it, so I've found out how icon files work and I'm writing my own! (which will soon be released here for all you other money hugging programmers). I would also like to make the VB bit work without VB, but since I don't have VB that will be difficult...
btw - gizmostripe, next time you make an article, CROP your images so they don't push everything else off screen
Nice article, this is especially nice to create a loader.
Icons i don't really care, 256 colour is enough for me, but the truth is, i use tgf, which only gives me 16 colours.
So i try to make the best out of it and give a nice icon file with my package, in case some people wants to make a nice shortcut somewhere.