Name: TJhDefaultPrinter
Author: jhh09 (Jim Hale Jr.)
Date: 10/1/00

This is a non-visual component that sets the system-wide default printer on Windows 95, 98, ME, NT, and 2000.  It also provides easy access to all the printers available to the user.

Properties:

printerNames: TStringList 

// holds the names of the printers the user can choose from.

defaultPrinterIndex: integer 

// holds the position in printerNames of the current default printer

Methods:

function getDefaultPrinterName: string

// returns the name of the default printer, empty string if there isn't one

function setDefaultPrinter(const position: integer): boolean

// sets the default printer to the one whose position in the printerNames
// list is position.  True if successful, false otherwise.

function setDefaultPrinter(const name: string): boolean

// sets the default printer to the one with the given name.  True if
// successful, false otherwise.

procedure Refresh

// retrieves the names of all installed printers and sets defaultPrinter
// with the position in printerNames of the default printer