Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

SetWindowPrinter() 函数

  • Last UpdatedFeb 05, 2018
  • 1 minute read

在运行时,可以使用 SetWindowPrinter() 函数设置希望使用的打印机。

备注:使用此函数设置的打印机也是 PrintHT() 函数所使用的打印机。

语法

SetWindowPrinter (printername)

参数

printername

打印机的名称或者显示为网络共享,或者显示为其属性窗口中所显示的打印机名。字符串值、消息标记名或字符串表达式。

示例

在本例中,PRTSRV1 是节点名,PRT22SW1 是赋予打印机的共享名。

SetWindowPrinter("\\PRTSRV1\PRT22SW1");

本例中,Epson LX-300 是打印机的名称,如打印机的“属性”窗口中所显示的那样。

SetWindowPrinter("Epson LX-300");

在本例中,MyPrinter 是消息标记,它包含所安装的 Windows 打印机的名称,或是指向共享网络打印机的路径。

SetWindowPrinter(MyPrinter);

In This Topic