Chapter Nine: Shortcuts

Shortcuts are one of the handiest features of the Microsoft Windows 95 user interface. Keeping shortcuts on your desktop makes it quick and easy to access the items that you use most often—a specific document, a favorite application, or a printer, for instance.

A shortcut is a convenient way to reference an object in the shell name space (the hierarchical structure of objects in the user interface) without having to keep track of the object's actual name and location. Figure 9-1, for example, shows the icon that appears on the desktop when you create a shortcut to the Paint program in Windows 95. (Notice the small arrow in the lower left corner of the icon, which designates a shortcut.) Double-clicking this icon activates Paint.

Figure 9-1.

A shortcut to Paint.

A user can create a shortcut to an object by using the object's context menu or by using the File menu in Windows Explorer. You can also provide shortcuts programmatically, as part of your applications. You can set up shortcuts to many different kinds of objects, including files, folders, Control Panel, printers, and various applications.

Once a shortcut exists, the user no longer needs to know the object's name and location. Double-clicking the shortcut to a file, for instance, simply activates the file (the default action for that file). That is, if the user has a shortcut to a Microsoft Word document on the desktop, double-clicking the shortcut opens Word with the file specified as the current working document. If you set up a shortcut to a printer and then change the printer's network location, the shortcut continues to work. End users will still be able to print to that printer using the shortcut and will never know that the server has changed, because the location is transparent to them.

Shortcuts are also useful in installation or setup programs. For example, the setup could place a shortcut to your release notes or to a README file on the desktop. This makes it easy for the user to browse through the information, and it's also more likely that the user will actually read the file instead of simply ignoring it. You could also provide a shortcut in a multiple document interface (MDI) application to help the user keep track of the last document opened. The user could subsequently click that shortcut at any time to run your application again in the context of that document.

Users can create shortcuts of their own and place them on the desktop. After finding the object that is the target of the shortcut, a user can set up a shortcut in any of these three ways:

Figure 9-2.

The Create Shortcut item on a context menu.

Figure 9-3.

The Create Shortcut item on the File menu.

NOTE: If you create a shortcut to another shortcut, the system simply copies the shortcut—it does not create a new shortcut. Do not assume that shortcuts remain independent of one another.