|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to get PRINTERS NAMES ?I need to load all the available printers
- including network ones - in a combobox. Would anybody so kind as to show me how to do it? Thank you -Pamela You can get a list of installed printers using the static
"InstalledPrinters" property of the PrinterSettings class. using System.Drawing.Printing; try { foreach (string printer in PrinterSettings.InstalledPrinters) { this.comboBox1.Items.Add(printer); } } catch { // ... handle exception ... } -- Show quoteTim Wilson ..NET Compact Framework MVP <pamelaflue***@libero.it> wrote in message news:1130460815.534878.137250@g43g2000cwa.googlegroups.com... > I need to load all the available printers > - including network ones - in a combobox. > > Would anybody so kind as to show me how to do it? Thank you > > -Pamela > Thank you very much Tim. Very helpful!!
-Pamela Tim Wilson (UNDERSCORE AT PERIOD) ha scritto: Show quote > You can get a list of installed printers using the static > "InstalledPrinters" property of the PrinterSettings class. > > using System.Drawing.Printing; > > try > { > foreach (string printer in PrinterSettings.InstalledPrinters) > { > this.comboBox1.Items.Add(printer); > } > } > catch > { > // ... handle exception ... > } > > -- > Tim Wilson > .NET Compact Framework MVP > > <pamelaflue***@libero.it> wrote in message > news:1130460815.534878.137250@g43g2000cwa.googlegroups.com... > > I need to load all the available printers > > - including network ones - in a combobox. > > > > Would anybody so kind as to show me how to do it? Thank you > > > > -Pamela > > |
|||||||||||||||||||||||