PrinterSettings.PrinterResolutions Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém todas as resoluções suportadas por esta impressora.
public:
property System::Drawing::Printing::PrinterSettings::PrinterResolutionCollection ^ PrinterResolutions { System::Drawing::Printing::PrinterSettings::PrinterResolutionCollection ^ get(); };
public System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection PrinterResolutions { get; }
member this.PrinterResolutions : System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection
Public ReadOnly Property PrinterResolutions As PrinterSettings.PrinterResolutionCollection
Valor de Propriedade
A PrinterSettings.PrinterResolutionCollection que representa as resoluções suportadas por esta impressora.
Exemplos
O exemplo de código seguinte preenche a comboPrintResolution caixa de combo com as resoluções suportadas. O exemplo exige que exista uma PrintDocument variável nomeada printDoc e que exista a caixa de combo específica.
// Add list of printer resolutions found on the printer to the combobox.
// The PrinterResolution's ToString() method will be used to provide the display String.
PrinterResolution^ pkResolution;
for ( int i = 0; i < printDoc->PrinterSettings->PrinterResolutions->Count; i++ )
{
pkResolution = printDoc->PrinterSettings->PrinterResolutions[ i ];
comboPrintResolution->Items->Add( pkResolution );
}
// Add list of printer resolutions found on the printer to the combobox.
// The PrinterResolution's ToString() method will be used to provide the display string.
PrinterResolution pkResolution;
for (int i = 0; i < printDoc.PrinterSettings.PrinterResolutions.Count; i++){
pkResolution = printDoc.PrinterSettings.PrinterResolutions[i];
comboPrintResolution.Items.Add(pkResolution);
}
' Add list of printer resolutions found on the printer to the combobox.
' The PrinterResolution's ToString() method will be used to provide the display string.
Dim pkResolution As PrinterResolution
For i = 0 to printDoc.PrinterSettings.PrinterResolutions.Count - 1
pkResolution = printDoc.PrinterSettings.PrinterResolutions.Item(i)
comboPrintResolution.Items.Add(pkResolution)
Next
Observações
Contém PrinterSettings.PrinterResolutionCollectionPrinterResolution instâncias que representam as resoluções da impressora suportadas pela PrinterResolution.Kind propriedade , que contém um dos PrinterResolutionKind valores.
Normalmente, define a fonte em papel de uma página através da PageSettings.PrinterResolution propriedade como válida PrinterResolution disponível na PrinterResolutions coleção.
Se PrinterResolutionKind for Custom, então use as X propriedades e Y para determinar a resolução personalizada da impressora nas direções horizontal e vertical, respetivamente.