LittleOleMeDesigns
asked on
VB.NET - Change Windows Printer Settings...
I am trying to figure out how to show the user a list of their installed printers to choose from. Then, based on the printer they select, show then the available paper sizes for that printer. And then, for the printer they selected, change some of their windows printer settings for that printer. Specifically: Paper Size and print Landscape instead of Portrait.
So what I'm needing to figure out how to do:
1. Show the user a list of their installed printers via combobox or listbox
2. Based on their selection, show the user the available paper sizes for that printer via combobox or listbox.
3. Change the default paper size and orientation of the chosen printer. (Same as you would do manually by going to Printers and Faxes, right-clicking on the printer, and choosing Properties.)
So what I'm needing to figure out how to do:
1. Show the user a list of their installed printers via combobox or listbox
2. Based on their selection, show the user the available paper sizes for that printer via combobox or listbox.
3. Change the default paper size and orientation of the chosen printer. (Same as you would do manually by going to Printers and Faxes, right-clicking on the printer, and choosing Properties.)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank-You for the excellent example!
http://msdn.microsoft.com/en-us/library/system.drawing.printing.aspx
You can use WMI to interact with the printers. Check these links
http://www.vbdotnetheaven.com/UploadFile/jodonnell/PrinterQueries04202005005917AM/PrinterQueries.aspx
http://www.dotnetcurry.com/ShowArticle.aspx?ID=148
http://search.code-head.com/F-Script-Printer-Settings-168348