请教:我想在我的软件上添加一个检测打印机是否安装的程序,应该怎样写呢?

guolucky2003 2003-08-18 03:12:13
请教:我想在我的软件上添加一个检测打印机是否安装的程序,应该怎样写呢?
...全文
17 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
道素 2003-08-18
  • 打赏
  • 举报
回复
Printers是收集系统安装打印机的一个集合
道素 2003-08-18
  • 打赏
  • 举报
回复
赞成楼上
例如
Private Sub Form_Load()
Dim i As Integer
Dim strPrintName As String
strPrintName = ""
For i = 0 To Printers.Count - 1
strPrintName = strPrintName & Printers(i).DeviceName & vbCrLf
Next
MsgBox strPrintName
End Sub
guolucky2003 2003-08-18
  • 打赏
  • 举报
回复
Dim p As Printer

Debug.Print Printers.Count
For Each p In Printers
Debug.Print p.DeviceName
Next
这句加在模块可以实现吗?Printers是什么意思呢?

wspsc 2003-08-18
  • 打赏
  • 举报
回复
use the collection prints!
but it is diff... connected or not,or ... power on,

7,759

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧