VB.net 打印机读取(选择)

前端之家收集整理的这篇文章主要介绍了VB.net 打印机读取(选择)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_301_0@ '需要引用: Imports System.Drawing.Printing 读取代码如下:
@H_301_0@ Dim prtdoc As New PrintDocument() Dim strDefaultPrinter As String = prtdoc.PrinterSettings.PrinterName '读取的是默认打印机名称 Dim strPrinter As [String] For Each strPrinter In PrinterSettings.InstalledPrinters '循环例出所有打印机名称 Next
@H_301_0@strPrinter.PaperName '打印机的纸张名称(类型) strPrinter.Width '纸张的宽度 strPrinter.Height '纸张的高度

猜你在找的VB相关文章