List & Label: Define Printer Without Selection Dialog

Valid from List & Label 6

How to define a destination printer in your application without displaying the printer selection dialog of List & Label:

Two ways to realize this would be:

a) Use the existing P-File (*.lbp for label project *.lbl), what includes the printer settings set by LlPrintOptionsDialogTitle. To create this file without actually printing you may use LlPrinterSetup(). If a corresponding P-File exists in the same directory as the project file List & Label will use these printer settings.

b) Generate a P-File on the fly using LlSetPrinterInPrinterFile().

Call LlSetPrinterInPrinterFile with the corresponding project name, the name of the desired printer and a valid DEVMODE structure for the printer used.

Instead of the DEVMODE structure you may also pass a NULL pointer to use the default setting of the printer.
To do so using Visual Basic you have to modify the last parameter of LlSetPrinterInPrinterFile() in the VisualBasic declaration file from pDevMode as DEVMODE to ByVal pDevMode as Long.

Since version 7.0 List & Label comes with a VB sample in ll70\vb\devmode\devm_vb6.vbp.

IDKBTE000463 KBTE000463