Rob van der Woude's Scripting Pages

Help text for PrinterSelectBox.cs

(view help text of PrinterSelectBox.cs as plain text)

PrinterSelectBox,  Version 2.07
Batch tool to present a Printer Select dialog and return the selected printer

Usage:    PRINTERSELECTBOX  [ "title"  [ "selected" ] ]  [ options ]

Where:    "title"     is the optional caption in the title bar
          "selected"  is the optional selected printer, either its full name or
                      a regular expression (default: the default printer name)

Options:  /H:height   window Height(def: 220; min: 220; max: screen height)
          /L[:string] Use Localized or custom captions (see Notes)
          /M          make dialog system Modal (i.e. always on top)
          /N          list Network printers only (default: list all printers)
          /O          list lOcal printers only   (default: list all printers)
          /P[:text]   Alternative "OK" button caption "Print" or "text"
          /W:width    window Width (default: 400; min: 400; max: screen width)

Notes:    Use /L for Localized "OK" and "Cancel" button captions only.
          Custom captions require a "localization string" in the format
          /L:"key=value;key=value;..." e.g. for Dutch on English computers:
          /L:"Name=Naam;Where=Lokatie;Comment=Opmerking;Cancel=Annuleren"
          The name of the selected printer is written to Standard Out if the
          "OK" button is clicked, otherwise an empty string is returned.
          If "selected" is specified, the program will try an exact (literal)
          match first; if no match is found, "selected" will be interpreted as
          a regular expression, and the first match in the sorted printer list
          will be used.
          If no "title" is specified and /P is used, the alternative "OK"
          button caption ("Print" or "text") will be used for "title" too.
          Return code 0 for "OK", 1 for (command line) errors, 2 for "Cancel".

Credits:  On-the-fly form based on code by Gorkem Gencay on StackOverflow:
          http://stackoverflow.com/questions/97097
          /what-is-the-c-sharp-version-of-vb-nets-inputdialog#17546909
          Code to retrieve localized button captions by Martin Stoeckli:
          http://martinstoeckli.ch/csharp/csharp.html#windows_text_resources

Written by Rob van der Woude
http://www.robvanderwoude.com

page last uploaded: 2022-10-05; loaded in 0.0069 seconds