PrinterResolution 类
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示打印机支持的分辨率。
public ref class PrinterResolution
C#
public class PrinterResolution
C#
[System.Serializable]
public class PrinterResolution
type PrinterResolution = class
[<System.Serializable>]
type PrinterResolution = class
Public Class PrinterResolution
- 继承
-
PrinterResolution
- 属性
下面的代码示例使用 comboPrintResolution
支持的分辨率填充组合框。 该示例假定 PrintDocument 存在名为 的 printDoc
变量,并且存在特定的组合框。
// 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 );
}
C#
// 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
此类由 PrinterSettings.PrinterResolutions 和 PageSettings.PrinterResolution 属性用于获取打印机上可用的打印机分辨率,并分别设置页面的打印分辨率。
Kind使用 属性可确定打印机分辨率类型是否为PrinterResolutionKind值 Custom。 如果是这样,请使用 X 和 Y 属性分别确定水平方向和垂直方向的打印机分辨率。
有关打印的详细信息,请参阅 System.Drawing.Printing 命名空间概述。
Printer |
初始化 PrinterResolution 类的新实例。 |
Equals(Object) |
确定指定对象是否等于当前对象。 (继承自 Object) |
Get |
作为默认哈希函数。 (继承自 Object) |
Get |
获取当前实例的 Type。 (继承自 Object) |
Memberwise |
创建当前 Object 的浅表副本。 (继承自 Object) |
To |
此成员重写 ToString() 方法。 |
产品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |