// Win32_Printer // Win32_PrinterConfiguration // Win32_PrinterController // Win32_PrinterDriver // Win32_PrinterDriverDll // Win32_PrinterSetting // Win32_PrinterShare // Win32_PrintJob private void button1_Click(object sender, EventArgs e) { infoBox.Clear(); DeviceHandler.PreparePrinters(this); List <SysPrinter> sysPrinters = DeviceHandler.MapSystemPrinters(Environment.MachineName); foreach (SysPrinter printer in sysPrinters) { infoBox.Text += printer.Name + " " + printer.Port + " " + printer.ComputerName + " BIDI=" + printer.EnableBIDI + Environment.NewLine; foreach (PrinterCapabilityEnum capability in printer.Capabilities) { String capabilityName = AssociatedText.GetFieldDescription(typeof(PrinterCapabilityEnum), capability.ToString()); infoBox.Text += capabilityName + Environment.NewLine; } infoBox.Text += Environment.NewLine + Environment.NewLine; } infoBox.Text += "Total de impressoras (sistema de accounting) = " + sysPrinters.Count.ToString(); }