包含当前操作安排的所有打印机对象。
属性/方法 | 说明 |
---|---|
Count | 当前安装打印机的数量 |
Item(n) | 返回打印机 Printer 对象 |
打印机对象,初始为默认打印机。
Printer.Print "打印文本,逗号表示制表符分隔","分号表示紧接着的内容";"无符号表示其后输出换行" |
属性/方法 | 说明 |
---|---|
Circle ... | 画圆或椭圆 |
ColorMode | 颜色模式,1 单色,2 彩色 |
Copies | 打印份数 |
CurrentX, CurrentY | 当前坐标位置 |
DeviceName | 返回打印设备名称 |
DrawMode | |
DrawStyle | 绘图线型 |
DrawWidth | 绘图线宽,像素值,默认为 1 |
DriverName | 打印驱动名 |
Duplex | 双面打印设置 |
EndDoc() | 绘图操作结束,开始打印 |
FillColor | 填充颜色,当 FillStyle=1 时忽略此值 |
FillStyle | 填充模式 |
Font | Font 对象,设置字体 |
FontBold, FontItalic, Font Strikethru, FontUnderline |
文字是否 加粗、斜体、中线、下划线 |
FontCount | 可用字库数量 |
FontName | 字体名 |
FontSize | 字体尺寸,磅值 |
FontTransparent | 是否保留文本下的背景,默认 TRUE |
Fonts | 所有字体名数组 |
ForeColor | 默认打印颜色(前景色) |
hDC | 设备场景句柄,可用于绘图 |
Height, Width | 按当前单位计算宽度、高度值,默认单位缇 |
KillDoc() | 取消打印任务 |
Line ... | 画线或矩形 |
NewPage() | 换页 |
Orientation | 纸张方向,1 纵向,2 横向 |
Page | 返回当前页号 |
PaintPicture(...) | 打印图象 |
PaperBin | 进纸槽位设置 |
PaperSize | 纸张尺寸代码,A4 = 9 |
Port | 打印机端口名 |
PSet [Step] (x, y), [color] | 画一个点,color 为颜色 |
RightToLeft | 从右向左的语言 |
Scale ... | 设置打印坐标系统 |
ScaleHeight, ScaleWidth | 打印范围的宽度和高度,指定新的值时,自动修改单位值大小以适应整个可打印区域 |
ScaleLeft, ScaleTop | 返回/设置打印区域左上边界 |
ScaleMode | 返回/设置当前 度量单位
,ScaleHeight, ScaleWidth 为新单位的量 ScaleLeft, ScaleTop 重设为 0 |
ScaleX(...) As Double | 计算若干个 A 单位等于多少个 B 单位 |
ScaleY(...) As Double | 同上 |
TextHeight(string) | 检测指定字符串打印所需高度 |
TextWidth(string) | 检测指定字符串打印所需宽度 |
TrackDefault | 是否始终使用默认打印打(当改变默认打印时) |
TwipsPerPixelX, TwipsPerPixelY | 返回 1 像素横向/纵向对应的 缇 数 |
PrintQuality | 打印质量(分辩率)种类 |
Zoom | 绘图比例,默认为 100 |
画圆或椭圆。
Printer.Circle [Step] (x, y), radius, [color, start, end, aspect] |
参数 | 说明 |
---|---|
Step | 指定相对于当前位置的坐标 |
(x,y) | 圆或椭圆中心坐标,单精度值 |
radius | 圆半径 |
color | RGB 颜色值,长整型 |
start | 起始角度,逆时针方向画 |
end | 结束角度 |
aspect | 纵横比,非 1 时为椭圆 |
画线或矩形或实心矩形。
Printer.Line [Step] (x1, y1) [Step] - (x2, y2), [color], [ B[F] ] |
参数 | 说明 |
---|---|
Step | 指定相对于当前位置的坐标 |
(x1,y1) | 起始坐标,单精度值 |
(x2,y2) | 结束坐标,完成后成为当前坐标 |
color | RGB 颜色值,长整型 |
B | 以两点为顶点画矩形 |
F | 画实心矩形 |
打印图象。
Printer.PaintPicture(picture, x1, y1, width1, height1, x2, y2, width2, height2, opcode) |
参数 | 说明 |
---|---|
Picture | Picture 对象 |
x1, y1 | 绘图位置 |
Width1 | 图象缩放到此宽度打印,负值翻转(可选) |
Height1 | 图象缩放到此高度打印,负值翻转 |
x2, y2 | 图象裁剪开始位置坐标 |
Width2 | 裁剪区域宽度 |
Height2 | 裁剪区域高度 |
Opcode | 绘图到目标时的位操作 |
页面范围按比例调整为某坐标系统中的一个距形位置。
注:纵横比例不同时,圆仍以 X 单位保持为正圆。
Printer.Scale [ (x1, y1) - (x2, y2) ] |
参数 | 意义 |
---|---|
无参数 | 页面单位回复到 缇 |
(x1,y1) | 页面左上角的坐标位置 |
(x2,y2) | 页面右下角的坐标位置 |
度量单位换算。
Printer.ScaleX(width, [fromscale] ,
[toscale])
Printer.ScaleY(height, [fromscale] , [toscale]) |
参数 | 说明 |
---|---|
width, height | 多少个 FromScale |
fromscale | 单位,转换前 |
toscale | 单位,转换后 |
常量 | 值 | 意义 |
---|---|---|
VbSolid | 0 | 实线,默认 |
VbDash | 1 | 虚线,WrawWidth 为 1 时 |
VbDot | 2 | 点线,WrawWidth 为 1 时 |
VbDashDot | 3 | 点划线,WrawWidth 为 1 时 |
VbDashDotDot | 4 | 双点划线,WrawWidth 为 1 时 |
VbInvisible | 5 | 无线 |
VbInsideSolid | 6 | 内收实线 |
常量 | 值 | 意义 |
---|---|---|
VbPRDPSimplex | 1 | 使用当前方向设置单面打印 |
VbPRDPHorizontal | 2 | 双面打印,同方向 |
VbPRDPVertical | 3 | 双面打印,反方向 |
VbFSSolid | 0 | 实心填充 |
VbFSTransparent | 1 | 透明,不填充 |
VbHorizontalLine | 2 | 水平线 |
VbVerticalLine | 3 | 垂直线 |
VbUpwardDiagonal | 4 | 上斜线 |
VbDownwardDiagonal | 5 | 下斜线 |
VbCross | 6 | 交叉线 |
VbDiagonalCross | 7 | 斜向交叉线 |
常量 | 值 | 意义 |
---|---|---|
vbPRPSLetter | 1 | Letter, 8 1/2 x 11 in. |
vbPRPSLetterSmall | 2 | Letter Small, 8 1/2 x 11 in. |
vbPRPSTabloid | 3 | Tabloid, 11 x 17 in. |
vbPRPSLedger | 4 | Ledger, 17 x 11 in. |
vbPRPSLegal | 5 | Legal, 8 1/2 x 14 in. |
vbPRPSStatement | 6 | Statement, 5 1/2 x 8 1/2 in. |
vbPRPSExecutive | 7 | Executive, 7 1/2 x 10 1/2 in. |
vbPRPSA3 | 8 | A3, 297 x 420 mm |
vbPRPSA4 | 9 | A4, 210 x 297 mm |
vbPRPSA4Small | 10 | A4 Small, 210 x 297 mm |
vbPRPSA5 | 11 | A5, 148 x 210 mm |
vbPRPSB4 | 12 | B4, 250 x 354 mm |
vbPRPSB5 | 13 | B5, 182 x 257 mm |
vbPRPSFolio | 14 | Folio, 8 1/2 x 13 in. |
vbPRPSQuarto | 15 | Quarto, 215 x 275 mm |
vbPRPS10x14 | 16 | 10 x 14 in. |
vbPRPS11x17 | 17 | 11 x 17 in. |
vbPRPSNote | 18 | Note, 8 1/2 x 11 in. |
vbPRPSEnv9 | 19 | Envelope #9, 3 7/8 x 8 7/8 in. |
vbPRPSEnv10 | 20 | Envelope #10, 4 1/8 x 9 1/2 in. |
vbPRPSEnv11 | 21 | Envelope #11, 4 1/2 x 10 3/8 in. |
vbPRPSEnv12 | 22 | Envelope #12, 4 1/2 x 11 in. |
vbPRPSEnv14 | 23 | Envelope #14, 5 x 11 1/2 in. |
vbPRPSCSheet | 24 | C size sheet |
vbPRPSDSheet | 25 | D size sheet |
vbPRPSESheet | 26 | E size sheet |
vbPRPSEnvDL | 27 | Envelope DL, 110 x 220 mm |
vbPRPSEnvC3 | 29 | Envelope C3, 324 x 458 mm |
vbPRPSEnvC4 | 30 | Envelope C4, 229 x 324 mm |
vbPRPSEnvC5 | 28 | Envelope C5, 162 x 229 mm |
vbPRPSEnvC6 | 31 | Envelope C6, 114 x 162 mm |
vbPRPSEnvC65 | 32 | Envelope C65, 114 x 229 mm |
vbPRPSEnvB4 | 33 | Envelope B4, 250 x 353 mm |
vbPRPSEnvB5 | 34 | Envelope B5, 176 x 250 mm |
vbPRPSEnvB6 | 35 | Envelope B6, 176 x 125 mm |
vbPRPSEnvItaly | 36 | Envelope, 110 x 230 mm |
vbPRPSEnvMonarch | 37 | Envelope Monarch, 3 7/8 x 7 1/2 in. |
vbPRPSEnvPersonal | 38 | Envelope, 3 5/8 x 6 1/2 in. |
vbPRPSFanfoldUS | 39 | U.S. Standard Fanfold, 14 7/8 x 11 in. |
vbPRPSFanfoldStdGerman | 40 | German Standard Fanfold, 8 1/2 x 12 in. |
vbPRPSFanfoldLglGerman | 41 | German Legal Fanfold, 8 1/2 x 13 in. |
vbPRPSUser | 256 | User-defined |
常量 | 值 | 意义 |
---|---|---|
vbPRPQDraft | -1 | 草稿质量 |
vbPRPQLow | -2 | 低分辨率 |
vbPRPQMedium | -3 | 中分辩率 |
vbPRPQHigh | -4 | 高分辩率 |
300 | 300 | 直接设定分辩率 |
常量 | 值 | 意义 |
---|---|---|
vbUser | 0 | Indicates that one or more of the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties are set to custom values. |
vbTwips | 1 | 缇,1440 缇/英寸,567 缇/厘米 |
vbPoints | 2 | 磅,72 点/英寸 |
vbPixels | 3 | 像素 |
vbCharacters | 4 | 字符,水平 120 缇,垂直 240 缇 |
vbInches | 5 | 英寸 |
vbMillimeters | 6 | 毫米 |
vbCentimeters | 7 | 厘米 |
vbHimetric | 8 | HiMetric |
vbContainerPosition | 9 | Units used by the control's container to determine the control's position. |
vbContainerSize | 10 | Units used by the control's container to determine the control's size. |
常数 | 值 | 描述 |
---|---|---|
VbPRBNUpper | 1 | 从上层纸盒进纸。 |
VbPRBNLower | 2 | 从下层纸盒进纸。 |
VbPRBNMiddle | 3 | 从中间纸盒进纸。 |
VbPRBNManual | 4 | 等待手动插入每页纸。 |
VbPRBNEnvelope | 5 | 从信封进纸器进纸。 |
VbPRBNEnvManual | 6 | 从信封进纸器进纸;但要等待手动插入。 |
VbPRBNAuto | 7 | (缺省值)从当前缺省纸盒进纸。 |
VbPRBNTractor | 8 | 从拖拉进纸器进纸。 |
VbPRBNSmallFmt | 9 | 从小型进纸器进纸。 |
VbPRBNLargeFmt | 10 | 从大型纸盒进纸。 |
VbPRBNLargeCapacity | 11 | 从大容量进纸器进纸。 |
VbPRBNCassette | 14 | 从附加的卡式纸盒进纸。 |