解决 莫名其妙的问题Printers.Count 2 ,改用API函数 获得默认打印机,枚举打印机等 Public Sub WinNTGetDefaultPrinter(PrinterName As String) ' Get the printer information for the currently selected r = GetProfileString("Windows", "device", "", _ ' Parse the driver name anwww.shengfang.orgd port name out of the buffer PrinterName = DriverName
For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base: 266767 (http://support.microsoft.com/kb/266767/EN-US/) HOWTO: Set Which Printer Is the System Default Printer 142388 (http://support.microsoft.com/kb/142388/EN-US/) HOWTO: Changing WIN.INI Printer Settings from VB using Windows API For additional information on determining which 32-Bit for Windows NT 3.51, Windows NT 4.0 and Windows 95, click the article number below to view the article in the Microsoft Knowledge Base: 189249 (http://support.microsoft.com/kb/189249/EN-US/) HOWTO: Determine Which 32-Bit Windows Version Is Being Used 140560 (http://support.microsoft.com/kb/140560/EN-US/) HOWTO: Set the Default Printer Programmatically in Windows 95, Windows 98, or Windows Me 167735 (http://support.microsoft.com/kb/167735/EN-US/) FIX: Setting Printer to Item in the Printers Collection Fails 253612 (http://support.microsoft.com/kb/253612/EN-US/) FIX: Printers Collection May Not Contain All Printers in the Printers Folder 246772 (http://support.microsoft.com/kb/246772/EN-US/) How To Retrieve and Set the Default Printer in Windows 字体:大 中 小 |
![]() | 永久地址 http://www.shengfang.org/blog/p/printercount3.php |
![]() | 引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1122275256 |
2005年7月25日15:07星期一 [Dev开发]





