Xceed Chart for WinForms v4.4 Documentation
EnumerateInstalledPrinters Method
Example 


Xceed.Chart.v4.4 Assembly > Xceed.Chart Namespace > PrintManager Class : EnumerateInstalledPrinters Method
Enumerates the installed printers and returns the index of the default printer.
Syntax
'Declaration
 
Public Function EnumerateInstalledPrinters( _
   ByVal installedPrinters As ArrayList _
) As Integer
'Usage
 
Dim instance As PrintManager
Dim installedPrinters As ArrayList
Dim value As Integer
 
value = instance.EnumerateInstalledPrinters(installedPrinters)
public int EnumerateInstalledPrinters( 
   ArrayList installedPrinters
)

Parameters

installedPrinters
Example
The following code fills a combo box with the installed printers:
ArrayList arrComboItems = new ArrayList();
int nDefaultPrinter = ChartControl.PrintManager.EnumerateInstalledPrinters(arrComboItems);

for (int i = 0; i < arrComboItems.Count; i++)
{
   InstalledPrintersComboBox.Items.Add((String)arrComboItems[i]);
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PrintManager Class
PrintManager Members