WPF通过局域网使用打印机 [英] WPF Using Printer from LAN
本文介绍了WPF通过局域网使用打印机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!
你们中的任何人都可以帮助我如何找到连接到PC的打印机(例如1个通过USB连接的打印机和一个通过LAN连接的打印机),然后使用选定的打印机进行打印吗?
我需要创建一个配置,因此用户将选择打印机(例如,她的ip地址,该地址不保存在数据库中),因此下次使用该打印机可以打印任何内容.
感谢您的帮助!
Hi!
Does any of you can help me how to find printer connected to PC (for example 1 connected via USB, and one via LAN), and then print something using selected printer?
I need to create a configuration, so user will choose printer (for example her ip adress which ill save in database), so next time anything will be printed using this printer.
Thanks for any help!
推荐答案
通常,您不需要直接获取已连接打印机的列表.用户在打印对话框中获取它们.在WPF中,这可以是类System.Windows.Controls.PrintDialog
:
http://msdn.microsoft.com/en-us/library/system. windows.controls.printdialog.aspx [ ^ ].
WPF打印的整个主题是一个相对较大的主题.有完整的MSDN文档和文章数量.看看:
http://bit.ly/T5rUnw [ ^ ].
祝你好运,
—SA
Normally, you don''t need to get the list of connected printers directly. The user gets them in the print dialog. In WPF, this can be the classSystem.Windows.Controls.PrintDialog
:
http://msdn.microsoft.com/en-us/library/system.windows.controls.printdialog.aspx[^].
The whole topic of WPF printing is relatively big topic. There is comprehensive MSDN documentation and number of articles. Just look:
http://bit.ly/T5rUnw[^].
Good luck,
—SA
这篇关于WPF通过局域网使用打印机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文