发布于 2004-07-27 14:36:10
0楼
VB6.0中有个CommonDialog控件和Printer对象:
'* 设置公共对话框控件的属性
With CommonDialog1
.Flags = cdlPDPrintSetup '* 显示打印设置对话框
.PrinterDefault = True '* 改变系统缺省的打印机设置
.Orientation = cdlLandscape '* 设置纸张方向为横向
.Copies = 1 '* 设置打印份数为1份
End With
CommonDialog1.ShowPrinter '* 显示打印机属性对话框,可以不要
If Printers.Count = 0 Then
MsgBox "系统未安装打印机!", vbInformation, "打印机错误"
GoTo Proc_Exit
End If
If Printer.DeviceName = "" Then
MsgBox "系统未设置默认打印机!", vbInformation, "打印机错误"
GoTo Proc_Exit
End If
'* 按照用户设定的纸张方向进行打印
Printer.Orientation = CommonDialog1.Orientation
以上是否适应WinCCV6.0中的VBS,未作试验。
无论成与败,无论甜与苦,我还是我。