Copyright: Copyright © 1995, PC Magazine
Citation: Copyright © 1995, PC Magazine


Cannot Save 2-color PE Icon

Because 32-bit Windows Portable Executable files have a different format from 16-bit Windows files, IconJack has to use a different method for saving these as .ICO files and saving their data into a .DLL. This method extracts only one image of the icon. It also fails if the only image in the icon is monochrome. You have attempted to save just such an icon. If you click the Yes button, IconJack will delete the offending icon. Click No and IconJack will leave the icon alone.


Clear

Empty the collection of icons completely, ready to start fresh.


Contents
 IconJack Help Contents

IconJack has four major functions

1) Viewing collections of .ICO files

2) Extracting icons from .EXE or .DLL files

3) Saving extracted icons to .ICO files

4) Merging a collection of icons into a new .DLL file

Overview

Click on elements of this picture of IconJack's main window for help.

IconJack's menus:

File menu

Icon menu

Options menu


Default file type

These four items determine which file type is the default in the File Open dialog that comes up when you choose Read Icons from the File menu.  Only one of them can be checked at a time, naturally.  If you're mostly interested in viewing and gathering icons, you'll want to set the default to .ICO files.  If you're looking to extract icons from .EXE or .DLL files, set the default to .EXE or .DLL.  And if you simply want to gather as many icons as possible, set the default to all three.


Delete

Delete the highlighted icon from the list.


Extracting Icons from .EXE and .DLL files

Choose Read Icons... from the File menu, and select one or more files using the mouse or keyboard.  .ICO files just contains one icon, but .EXE and .DLL files can hold many.  If a particular .EXE or .DLL file contains icons, IconJack will add all of the icons to its display; if the file is invalid or contains no icons, IconJack will just skip it.  Note that some icons actually consist of multiple images; IconJack will display the image most appropriate for the current video mode.


File Manager Drag And Drop

Many modern programs, including IconJack, accept single files or groups of files dragged from File Manager.  Here's a quick way to collect every .ICO file on your disk.  Use File Manager's Search function to search for files matching *.ICO in the root directory and all subdirectories.  Highlight the first found file, then shift+click on the last.  Now drag this group of files onto IconJack.

You can drop files on IconJack even when it's minimized.  The only time it won't accept files is when it's already busy processing files.  When you drag files to IconJack the cursor turns to an arrow with a rectangle to indicate that it it is ready to accept them.  If IconJack is busy, the cursor will no change.


File menu

(Note that the file menu items are disabled when IconJack is busy reading icons or writing a .DLL)

Read Icons...

Save Icon as .ICO...

Save Collection As DLL...


Icon Spacing

You can set the horizontal spacing of IconJack's icons to any value from 38 to 196, and the vertical spacing anywhere from 38 to 128. Each icon will be centered in the available space. The smaller the spacing, the more icons you can see at once.  On a 1024x768 screen with spacing as small as possible, IconJack can show over 400 icons at once.

When you choose Spacing... from the Options menu you'll see the Icon Spacing dialog. You can enter the desired spacing in the boxes at the bottom (values outside the allowable range will be forced into range).  To make small adjustments up or down, you can click the spin buttons to the right of each number box.  Or you can use the mouse to size the spacing box within the rectangle.

When you change the spacing or resize IconJack's main window, the window's width will snap to a value that precisely fits a whole number of columns.  If you were widening the window, it snaps up to the next full column; if you were narrowing it, it snaps down to cut off an incomplete column.


Icon from .DLL or .EXE
This icon was extracted from a regular Windows .EXE or .DLL file.


Icon indicator
The "I" above and to the left of an icon indicates that it actually came from an .ICO file, as opposed to being extracted from an .EXE or .DLL file.  You can turn icon marking on or off by checking the Mark .ICO Files choice under the Options menu.


Icon menu

(Note that the icon menu items are disabled when IconJack is busy reading icons or writing a .DLL)

Clear

Delete

Mark

Place


IconJack's Capacity

IconJack's capacity is limited to 900 icons.  Observation shows that Windows is able to extract icons from a file with 900 icons in it, but not from a file with 1,000 icons.  Thus if you saved 1,000 icons into a .DLL, it would be useless; IconJack itself wouldn't be able to read the icons back into memory.  900 is an arbitrary number safely below the range at which Windows has trouble.

Note also that the icons loaded into IconJack take up memory themselves.  The exact amount depends on the video mode.  In 256 color mode, the image data for an icon takes a bit over 1KB, and there's additional overhead as well.  900 icons use over a megabyte of memory!  In general you're better off creating .DLLs that hold no more than a few hundred related icons.

Consider the 448 icons that come with Visual Basic.  Each occupies 766 bytes, but in reality they require a minimum of 2KB apiece, because that is the minimum hard disk cluster size.  Thus on a small hard disk, these icons occupy 996KB.  If they're stored on a very large hard disk, say, 1GB in size, with 32k clusters, they use FOURTEEN MEGABYTES!  By contrast, an IconJack .DLL file holding all 448 of them is about 350KB in size.


Icons and Images

Windows uses a program's icon to represent that program when it's minimized, and to represent its program item in Program Manager.  The icon is the visual representation of the program, so it's important that Windows render it in a clear way.  What should happen, for example, if Windows is running in monochrome mode?  If you just replace all "sort of bright" colors with white and all "sort of dark" colors with black, the image may be ruined.

In order to give the best possible icon display under varying system configurations, Windows allows icons to contain multiple images.  Just about every icon has a 32x32 pixel 16-color image, as this is what's used in virtually any color configuration.  Many icons also include a 32x32 pixel 2-color image, for the occasional monochrome installation.  Other icons sizes and color depths are possible, but uncommon.

In order to copy all of the information about an icon into a .DLL file, IconJack reaches into the original file and pulls out all the images.


Keyboard selection of multiple files
To select a continuous series of files from the list, arrow to the first filename, then hold down shift while arrowing to the last.

To select or de-select single files, press Shift+F8 to enter "Add mode". Move the highlight with the arrow keys and press spacebar to select. Press Shift+F8 again to leave "Add mode".


Mark

Mark the highlighted icon, in preparation for moving it to another location. This option is provided for keyboard-only users and for moving icons in very large collections; in general you'll want to reorder icons by drag-and-drop. Press Ctrl+M to invoke this menu item at any time.


Mark .ICO files

If this menu item is checked, IconJack will mark icons that came from actual .ICO files, as opposed to being extracted from .DLL or .EXE files.  It will write a capital "I" near the top left corner of the icon.


Mark PE files

If this menu item is checked, IconJack will mark icons that came from Portable Executable files.  It will write a capital "P" near the top left corner of the icon.  Why does this matter?  IconJack can't extract 100% of the icon information from PE files - it will extract a single image even if the icon contains multiple images.


Mouse selection of multiple files
To choose a continuous series of files from the list, click on the first one and Shift+click on the last.

To select or de-select a single file, Ctrl+click on it.


Options menu

Note that the status of each item on the Options menu is stored in IconJack.INI and restored next time you run the program.  All of these options will be disabled when IconJack is busy reading icon files or writing a .DLL file.

Spacing...

Mark .ICO files

Mark PE files

Quiet

Default file type


Overview

Icons in Windows are minimal visual representations of a program or program function.  Just 32 pixels square, they pack a surprising amount of visual information.  An icon can be a company logo, a picture of the kind of work the program does, a metaphor for the program's activity, or any image at all..

Unfortunately, when it comes to naming icons you're restricted by the same 8-letter filename convention that applies to all DOS and Windows files.  What does MISC44.ICO represent, or TRFFC10A.ICO, or ARW03DN.ICO?  You really can't tell without seeing the icon.

IconJack is a multi-function utility. Its first function is to let you pick and choose icons visually.  Choose a directory, select one or more .ICO files, and IconJack will display them in a multi-column list box.  If you prefer, drag .ICO files onto IconJack from File Manager.  Click on any icon to see the name of the corresponding .ICO file.  Make the window as big as you like, and adjust the icon spacing to pack in as many icons as possible or to give plenty of room around the icons.

Not all icons exist as .ICO files, though.  For example, PROGMAN.EXE contains 46 icons that you can use to represent particular programs.  If that's not enough, the MORICONS.DLL file that comes with Windows has over a hundred more icons.  And every normal Windows .EXE file has one or more icons embedded in it.  IconJack will load these icons too - just select an .EXE or .DLL file to extract the icons for viewing.  Or, if you prefer, drag .EXE or .DLL files onto IconJack from File Manager.

Perhaps you'd like to use one of the MORICONS.DLL icons as a starting point for designing an icon of your own. Highlight the icon in IconJack's display and choose Save Icon from the File menu to save an extracted icon as an .ICO file.

IconJack's final function is to merge any number of individual icons into a Windows-format .DLL file like MORICONS.DLL.  Icon files are small, usually under 1KB in size.  DOS allocated disk space in clusters of 2KB, 4KB, 8KB, or more, depending on the size of your disk.  Thus every icon file wastes at least 1KB of disk space, possibly much more.  A collection of 50 icons on an unpartitioned 1GB hard drive, where each cluster is 32k, will waste over a megabyte of space!  By storing your icon collection in one or more IconJack files, you can recover that wasted space.  You can use the resulting DLL just as you would MORICONS.DLL, or you can extract the icons to .ICO files again when you need them.

IconJack handles .EXE and .DLL files written for Windows 3.1 or Windows for Workgroups.  Windows 95 and Windows NT have a new format for executable files, and IconJack can extract icons from these "Portable Executable" files, but only partially.  IconJack will hold up to 900 icons for display, and will save up to 900 icons in a single .DLL.


PE indicator
The "P" above and to the left of this icon indicates that it was extracted from a 32-bit Windows "Portable Executable" file.  IconJack can't extract 100% of the information from PE files.  To turn the PE indicator on or off, check the Mark PE files menu choice under the Options menu.


Place

Moves a marked icon to the currently highlighted location.  This option is disabled if no icon is marked. In general, you will want to move icons by drag-and-drop; this option is provided for keyboard-only users and for moving icons in very large collections.  Press Ctrl+P at any time to invoke this menu item.


Portable Executable Files

.EXE files that run under Windows are called "New Executable" files, to distinguish them from the old DOS-only files.  They actually have the initials "NE" embedded in them.  .DLL files also use a form of the New Executable format.  IconJack goes to great lengths to decode this file format in order to get all of the image information for the icons it extracts.

32-bit versions of Windows use yet another format for programs called the Portable Executable format.  Portable Executable files have the signature "PE" embedded in them where New Executables have "NE", and their internal layout is wildly different.  IconJack doesn't have the ability to extract multiple images from an icon found in a PE file.  Instead, it will extract a single 16-color image.

IconJack identifies icons from Portable Executable files by putting "(PE)" after the icon name and number on the status bar.


Quiet

Because IconJack's processing can take a while, its default behavior is to alert you with a system sound when processing is complete.  It also plays the system "critical stop" sound when presenting an error box.  If you'd rather not have this audible notification, put a check next to the Quiet menu choice


Re-ordering Icons
Reordering Icons

It's simple to change the order of icons in the list - just drag any icon to the position you want it to be in.  The cursor will change to a hand with a square of inverted color attached.  In the picture, you can see the icon-drag cursor just below the icon that consists of the text "NOW!"

If the destination for the icon you're moving isn't visible, you can enlarge the IconJack window, or drag the icon in several steps.  You can also select Mark from the Icon menu or press Ctrl+M to mark the highlighted icon. Then highlight the desired destination and select Place from the Icon menu or press Ctrl+P to move the marked icon.


Save Collected Icons As a DLL

Choose Save As DLL... from the File menu to save the displayed collection of icons as a standard Windows .DLL file.  The resulting file will be similar to the MORICONS.DLL file that comes with Windows.  You'll find the string "Icons collected by IconJack (IconJack copyright '(c) 1995 by Ziff-Davis Publishing Company)" embedded in the .DLL file.  Of course the copyright notice applies to IconJack, not to your collection of icons!

If you gather icons from many sources, you may find you don't want all of them in your final collection.  Choices under the icon menu let you Delete an icon, Clear the list, or Mark an icon for moving and Place it at a new location.  Mark and Place are for keyboard enthusiasts - mouse-fans can simply drag an icon to its new position.


Save Icon Failed

The most likely reason for this message to occur is that the DLL or EXE file containing the icon has been deleted, moved, or renamed since the time it was read into IconJack's memory.  A corrupted DLL or EXE file can also cause this error.  One specific example of a corrupt file that can cause this error to occur is an icon whose header specifies more images than it actually has.  Another is a file in which the internal ID number for one or more icon images is invalid.  Press Yes and IconJack will delete the problem icon.  If the problem was with the whole file, IconJack will delete all icons from that file.  Press No and IconJack will leave the cleanup to you.


Save as .DLL failed

The most likely reason for this problem to occur is that one of the files from which you're extracting icons has been renamed, moved, or deleted.  It's also possible for certain rare kinds of file corruption to cause this problem.  The file can't be TOO badly corrupted, or IconJack's initial attempt to read icons for display would fail.  One specific example of a corrupt file that can cause this error to occur is an icon whose header specifies more images than it actually has.  Another is a file in which the internal ID number for one or more icon images is invalid.

The error message will normally give you the name of the offending file.  Press Yes and IconJack will delete the problem icon.  If the problem was with the whole file, IconJack will delete all icons from that file.  Press No and IconJack will leave the cleanup to you.  After you have deleted the problem icons, you can try to save the collection as a .DLL again.


Saving Extracted Icons to .ICO Files

This menu choice creates an .ICO file from the highlighted icon by extracting the complete icon information from the .DLL or .EXE file that contains the icon.  The resulting .ICO file will contain all of the images from the .DLL or .EXE file, not just the image suited to the current display mode.  If the highlighted icon originated in an .ICO file, this menu item will be disabled.


Selected icon
This icon is selected.  The name of the file from which it was extracted appears in the status bar.


Status Bar

The Status Bar at the bottom of the IconJack window identifies the source of the highlighted icon.  If the icon came from an .EXE or .DLL file, the icon's number within the file will appear after the name; if it came from an .ICO file "(Icon)" will appear after the name.  Icons from Portable Executable files will have "(PE)" displayed after the name and icon number.

When the menu is active, the status bar will display a short explanatory hint for the highlighted menu item.


Using IconJack's Files

To use an icon stored in an IconJack file as an application's icon in Program Manager:

1) Highlight the existing icon in Program Manager

2) Press Alt+Enter, or choose Properties from the File menu

3) Press the Change Icon button

4) Press the Browse button

5) Select your IconJack file

6) You will now see the icons from the file displayed in a horizontal line. Pick one.

7) Press OK

8) Press OK


Viewing Collections of Icon Files

Choose Read Icons... from the File menu. IconJack will list all icon files in the current directory.  You can choose one or many files from the list using the mouse or the keyboard.  When you press OK, IconJack will read all of the selected files and display them in its main window.  If any of the files doesn't contain valid icon images, IconJack will just skip it.

IconJack can also extract icons contained in .EXE or .DLL files.


When IconJack is Busy

IconJack has to do a lot of work with files, and file input/output is about the slowest thing a computer does.  In order to write a collection of icons to a .DLL, IconJack has to open the file holding each icon, read data from several locations, and write the data to the .DLL.  That can take up to several minutes.  Reading a lot of files to extract their icons can also be a relatively slow process.

IconJack is a polite Windows program; it allows other programs to process messages while it's doing this slow work.  However, confusion could result if you tried to start another process within IconJack while it's busy.  To prevent that, when IconJack is busy it disables all of its menu items except Help.  The cursor turns to an hourglass, and the status bar indicates what's going on.  IconJack signals Windows that it doesn't want to accept dropped files from File Manager, too.  You can move and resize IconJack's window, and you can call up the help system.  If you arrow to a menu item and press F1, you'll get help for that item.  But you can't do anything until IconJack stops being busy.

It's conceivable, though unlikely, that an unexpected combination of circumstances could leave IconJack in the busy state even when it's not actually busy.  That's a problem, because you can't Exit the program while it's busy.  If you're absolutely sure that IconJack is not actually processing files, you can cancel the busy state by double-clicking with the right mouse button on the minimize button.