[Mono-dev] Get list of installed printers

gigi gogu dantes_programmer at yahoo.com
Sat Dec 31 09:37:16 EST 2005


Hy there again,
 
 any ideeas in how can I retreive the list of printers installed on a system?
 In Windows.Forms was easy:
 
 using System;
 using System.Drawing.Printing; 
 ...
 ComboBox cmbPrinters=ComboBox.NewText();
 ...
 private void loadPrinters(){
             int nr=PrinterSettings.InstalledPrinters.Count;
             for (int i = 0; i < nr; i++)
             {
                 string printer=PrinterSettings.InstalledPrinters[i];
                 cmbPrinters.AppendText(printer);
             }
 }
 
 But in mono i get this error:
 Unhandled Exception: System.NotImplementedException: The requested feature is not implemented.
 in [0x00005] (at /tmp/scratch/BUILD/mono-1.1.12/mcs/class/System.Drawing/System.Drawing.Printing/PrinterSettings.cs:272) System.Drawing.Printing.PrinterSettings:get_InstalledPrinters ()
 ....
 
 Is there another way to get the installed printers?
 My mono version is 1.1.12_0.
 
 Dantes.
 P.S. A happy new year for all mono-developers! :P
 

		
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051231/fac040f7/attachment.html 


More information about the Mono-devel-list mailing list