Contents of the PRNSETUP.TXT file
Copyright 1991 John Navas, All Rights Reserved. A non-exclusive
license is hereby granted for personal, non-commercial use. These
files may be freely copied and distributed so long as no fee is
charged and none of the files are altered or deleted.
One of the most significant weaknesses of Visual BASIC 1.0 is the
inability of an application to directly invoke the (DeviceMode) setup
routines of Windows printer drivers, a service that users need and
expect in any application that supports printing. One alternative is
to use a DLL written in some other language, but that's a bit of a
kludge; another alternative is to use the Windows Control Panel, but
requiring the user to invoke it manually is crude and clumsy.
PrinterSetup is a Visual BASIC form that makes the second alternative
more palatable. It consists of a standard printer setup dialog box
that automatically uses the Windows Control Panel to invoke the
appropriate printer driver setup routines. When the printer driver
dialog box is closed by the user, the Windows Control Panel is
automatically closed by PrinterSetup if it had not been running
previously. Proper focus is also automatically restored.
PrinterSetup would typically be shown from a "Printer Setup..." choice
on an application's File menu. PRNSETST.FRM is a working example of
how to use PrinterSetup. Execute PRNSETUP.EXE for a demonstration.
(VBRUN100.DLL is required.)