Teklynx Discover ActiveX Programmer's Manual page 67

Table of Contents

Advertisement

Reference Guide
Chapter 2 -- 59
" " " " Printer.SetParameter (not yet implemented)
VTS_BOOL or Boolean
SetParameter(strParameter,
varValue).
Changes the current printer settings.
Parameters:
strParameter
Required VT_BSTR or String. Parameter name to
use.
varValue
Required VT_VARIANT or Variant. Value to set.
" " " " Printer.SwitchTo ()
VTS_BSTR or String
SwitchTo( strPrinterName,
strPortName, boolDirectAccess ).
Changes the current printer.
Return value: Returns the name of the installed printer.
Automatically installs a printer if no printer is already installed.
You don't need to add a printer through the user interface.
Parameters:
strPrinterName
Required VT_BSTR or String. Printer 's
name to switch to.
strPortName
Optional VT_BSTR or String. Port's name to
switch to.
boolDirectAccess
Optional VT_BOOL or Boolean. Is the
connection of the port direct or not.
Form 1
SwitchTo(« THTPrinter L-1234 », « LPT1: », FALSE).
Result of this instruction is « THTPrinter L-1234,LPT1: ».
Form 2
SwitchTo(« THTPrinter L-1234, ->COM3: »).
Result of this instruction is « Copy of THTPrinter
L-1234, ->COM3: » because printer's name is unique.
You can either use form 1 or form 2.
Don't insert spaces between the components in Form 2.
Notice that the names are case sensitive !

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents