Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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!
Posted

1 solution

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 class System.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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900