Monday, February 13, 2006
Dealing with Icons and Large Executables
Posted by Raphael Salgado in "ARTICLE" @ 06:01 PM
Every Pocket PC user I know has quietly suffered the agonizing wait of having icons show up after a soft reset. Avid users who frequently soft-reset their device particularly bear this burden. The problem lies with the way Windows Mobile obtains the icon on its first run; unlike Windows on your desktop that can use .ICO files, the icon data is embedded at the end of the executable. One would think it would have been addressed by now in 5.0, but the issue still remains - and with Persistent Storage, accessing the file can be even slower.
The problem gets worse when the program's executable is relatively large (over 1.5MB). Take Skype, for example. Their latest version is nearly 6MB (for a VoIP/chat program? 8O), and trying to access the icon data at the end of the file in your device's FlashROM or memory card can stall your device up to a full minute!
By applying an old trick used for embedded Visual Basic programs, I created a launcher application called RunSkype.exe, which is hardcoded to run the Skype executable. I also used an icon editor, such as Microangelo, to embed a full-color VGA-friendly icon in the tiny 26KB executable.
Place the RunSkype.exe file in the same folder where Skype is installed on your device, then create a shortcut for RunSkype.exe in your \Windows\Start Menu\Programs folder, replacing your old shortcut for Skype. The next time you soft reset, you'll appreciate how fast the icon shows up, and if you have a VGA Pocket PC, such as an HTC Universal or Dell Axim x50v, the icon will look a lot nicer, too. :D In fact, many programs could use a "facelift," what do you think?
The problem gets worse when the program's executable is relatively large (over 1.5MB). Take Skype, for example. Their latest version is nearly 6MB (for a VoIP/chat program? 8O), and trying to access the icon data at the end of the file in your device's FlashROM or memory card can stall your device up to a full minute!
By applying an old trick used for embedded Visual Basic programs, I created a launcher application called RunSkype.exe, which is hardcoded to run the Skype executable. I also used an icon editor, such as Microangelo, to embed a full-color VGA-friendly icon in the tiny 26KB executable.
Place the RunSkype.exe file in the same folder where Skype is installed on your device, then create a shortcut for RunSkype.exe in your \Windows\Start Menu\Programs folder, replacing your old shortcut for Skype. The next time you soft reset, you'll appreciate how fast the icon shows up, and if you have a VGA Pocket PC, such as an HTC Universal or Dell Axim x50v, the icon will look a lot nicer, too. :D In fact, many programs could use a "facelift," what do you think?