*****************************
DESCRIPTION

This component let you access to Windows95 structures containing virtually any information provided by the system about installed printers and their pending jobs.
Structures available are: PRINTER_INFO_1, 2 and 5, DEVMODE, JOBS_INFO_1 and 2 (see Win32 online help for details), plus some obvious properties (installed printer names list, selected printer name and index in the list and so on), methods and events.

Methods allow you pause, resume or clear the whole printer pending work or any single job, and configure printers, printer port and printer network connection (if any).
The OnJobStatusChange event is triggered any time the status of any of the pending job changes, due to user action or operating system activity.

TAKE CARE OF THE FACT THAT THE SUPPLIED PRINTER INFORMATION IS DRIVER DIPENDENT, that is, some printer drivers give you much more complete pieces of information than others. So you may find empty values, dipending on which printer is currently selected.

The jobs stuff seems to work fine, instead, with every printer.

I will try to do something better with the component when I'll have the time. In the meantime, I hope it may prove useful to someone.

*****************************
DETAILS

-----------
PROPERTIES:


PRINTERLIST: TStringList; the list of "fiendly" names of installed printers (i.e., "Fujitsu DL 3600" and so on);


PRINTERCOUNT: Integer; the number of installed printers;


PRINTERNAME: String; the "friendly" name of currently selected printer;
you may set this value to select a printer from PrinterList by name;


PRINTERINDEX: Byte; the zero-based index of currently selected printer in the PrinterList;
you may set this value to select a printer from PrinterList by number;


function PRINTERINFO1: TPrinterInfo1;
function PRINTERINFO2: TPrinterInfo2;
function PRINTERINFO5: TPrinterInfo5;
         DEVMODE:      TDevMode;

Windows95 printers structures: you may include the unit "WinSpool" in your unit to get the ability to declare record structures such as "TDevMode" and so on; See Win32 online help for details;
The above structures are obviously referred to currently selected printer;


function PRINTERSTATUSDESC: string; the description of printer status, based on the value of the Printer Status as supplied by the system. This piece of information is driver dependent (see above).


JOBCOUNT: Integer; the number of pending jobs;


function GETJOBSINFO1(Index: Integer): TJobInfo1;
function GETJOBSINFO2(Index: Integer): TJobInfo2;

these functions will give you, respectively, the JOBS_INFO_1 and JOBS_INFO_2 structures of Windows95, referred to the zero-based index of selected job in the list of pending jobs;
the Delphi declaration of the record structures is in the file "WinSpool" supplied with Delphi (declare this unit in the "uses" clause of your unit); description in Win32 online help;


function GETJOBSTATUSDESC(Index: Integer): string; a descriptive reporting of current job status (i. e. "-printing -paused"), referred to the zero-based index of selected job in the list of pending jobs;


-----------
METHODS

REFRESHPRINTERS: forces the re-reading of the list of installed printers (PrinterList, see above).


PRINTERPROPERTYDIALOG: Boolean;
CONFIGUREPORTDIALOG: Boolean;
NETPRINTERCONNECTDIALOG: Boolean;

Self-explanatory dialogs to pop up;
The result value is false if the function fails;


PAUSEPRINTER;
RESUMEPRINTER;
CLEARPRINTER;

Pause, Resume and Clear all pending jobs;


PAUSEJOB(Index: Integer);
RESUMEJOB(Index: Integer);
DELETEJOB(Index: Integer);

Pause, Resume or Delete the single, selected job;


-----------

EVENTS

ONNOPRINTER (no printer is installed, triggered at startup)
ONCHANGEPRINTER (user has selected another printer);
ONPRINTERSTATUSCHANGE (status of printer has changed);
ONJOBSTATUSCHANGE (status of any single job has changed);



*****************************
INSTALLATION (DELPHI 3)

After unzipping the MPrtInfo.dcu and dcr files, install the thing via the usual "Component" - "Install Component" Delphi3 menu, choose from the Browse dialog the "dcu" option and look for the file in the directory you unzipped it in.
You will find the component in the "System" tab, then you may move it where you want.


Try to run supplied demo while printing several documents to see the component at work!



*****************************
CONTACT ME

I will appreciate any comment, suggestion, bug report, or simply helloes. Well, I know it's not perfect. It's freeware!

My E-Mail:    marcomutti@numerica.it

If you should ever need the component source, I will send it to you for only US$ 15.00!
This will give you the right to get future improvements (if any).



*****************************
DISCLAIMER

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED "AS IS" AND WITHOUT ANY WARRANTIES OF ANY KIND, WHETHER EXPRESSED OR IMPLIED!
USE AT YOUR ON RISK!
