当前位置: 源码素材网 » VB教程 » 详情页

Vb打印机设置,包括纸张、纸型、打印质量等

  •   时间:2018-12-20
  • 概述:打印设置

Vb打印机设置,包括纸张、纸型、、进纸方式以及打印质量等的参数设定功能,具体所支持的设置功能,请参见代码的后半部分:

VERSION 5.00
Begin VB.Form Form1
   Caption         =   "打印设置"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4350
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4350
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1
      Caption         =   "颜色"
      Height          =   855
      Left            =   45
      TabIndex        =   7
      Top             =   1500
      Width           =   4215
      Begin VB.OptionButton Option2
         Caption         =   "彩色"
         Height          =   300
         Left            =   1980
         TabIndex        =   9
         Top             =   330
         Value           =   -1  'True
         Width           =   1560
      End
      Begin VB.OptionButton Option1
         Caption         =   "黑白"
         Height          =   300
         Left            =   300
         TabIndex        =   8
         Top             =   330
         Width           =   1560
      End
   End
   Begin VB.ComboBox Combo3
      Height          =   300
      Left            =   885
      TabIndex        =   5
      Text            =   "Combo1"
      Top             =   1020
      Width           =   3330
   End
   Begin VB.ComboBox Combo2
      Height          =   300
      Left            =   870
      TabIndex        =   3
      Text            =   "Combo1"
      Top             =   600
      Width           =   3330
   End
   Begin VB.CommandButton Command1
      Caption         =   "打印"
      Height          =   420
      Left            =   1410
      TabIndex        =   2
      Top             =   2640
      Width           =   1605
   End
   Begin VB.ComboBox Combo1
      Height          =   300
      Left            =   870
      TabIndex        =   0
      Text            =   "Combo1"
      Top             =   180
      Width           =   3330
   End
   Begin VB.Label Label3
      Caption         =   "打印质量:"
      Height          =   330
      Left            =   30
      TabIndex        =   6
      Top             =   1080
      Width           =   1590
   End
   Begin VB.Label Label2
      Caption         =   "进纸方式:"
      Height          =   330
      Left            =   15
      TabIndex        =   4
      Top             =   660
      Width           =   1590
   End
   Begin VB.Label Label1
      Caption         =   "打印纸:"
      Height          =   330
      Left            =   60
      TabIndex        =   1
      Top             =   240
      Width           =   1590
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Printer.PaperSize = Combo1.ListIndex + 2
  Printer.PaperBin = Combo2.ListIndex + 1
  Printer.PrintQuality = -(Combo3.ListIndex + 2)
  If Option1.Value = True Then Printer.ColorMode = 1
  If Option2.Value = True Then Printer.ColorMode = 2
  Printer.CurrentX = 200
  Printer.CurrentY = 200
  Printer.Print "VB编写打印设置程序"
  Printer.EndDoc
End Sub
Private Sub Form_Load()
  Combo1.AddItem "信笺,8 1/2 x 11 英寸"
  Combo1.AddItem "+A611小型信笺,8 1/2 x 11 英寸"
  Combo1.AddItem "小型报,11 x 17 英寸"
  Combo1.AddItem "分类帐,17 x 11 英寸"
  Combo1.AddItem "法律文件, 8 1/2 x 14 英寸"
  Combo1.AddItem "声明书,5 1/2 x 8 1/2 英寸"
  Combo1.AddItem "行政文件,7 1/2 x 10 1/2 英寸"
  Combo1.AddItem "A3, 297 x 420 毫米"
  Combo1.AddItem "A4, 210 x 297 毫米"
  Combo1.AddItem "A4小号, 210 x 297 毫米"
  Combo1.AddItem "A5, 148 x 210 毫米"
  Combo1.AddItem "B4, 250 x 354 毫米"
  Combo1.AddItem "B5, 182 x 257 毫米"
  Combo1.AddItem "对开本, 8 1/2 x 13 英寸"
  Combo1.AddItem "四开本, 215 x 275 毫米"
  Combo1.AddItem "10 x 14 英寸"
  Combo1.AddItem "11 x 17 英寸"
  Combo1.AddItem "便条,8 1/2 x 11 英寸"
  Combo1.AddItem "#9 信封, 3 7/8 x 8 7/8 英寸"
  Combo1.AddItem "#10 信封, 4 1/8 x 9 1/2 英寸"
  Combo1.AddItem "#11 信封, 4 1/2 x 10 3/8 英寸"
  Combo1.AddItem "#12 信封, 4 1/2 x 11 英寸"
  Combo1.AddItem "#14 信封, 5 x 11 1/2 英寸"
  Combo1.AddItem "C 尺寸工作单"
  Combo1.AddItem "D 尺寸工作单"
  Combo1.AddItem "E 尺寸工作单"
  Combo1.AddItem "DL 型信封, 110 x 220 毫米"
  Combo1.AddItem "C5型信封,162 x 229 毫米"
  Combo1.AddItem "C3 型信封, 324 x 458 毫米"
  Combo1.AddItem "C4型信封,229 x 324 毫米"
  Combo1.AddItem "C6型信封,114 x 162 毫米"
  Combo1.AddItem "C65型信封,114 x 229 毫米"
  Combo1.AddItem "B4型信封, 250 x 353 毫米"
  Combo1.AddItem "B5型信封,176 x 250 毫米"
  Combo1.AddItem "B6型信封, 176 x 125 毫米"
  Combo1.AddItem "信封,110 x 230 毫米"
  Combo1.AddItem "信封大王,3 7/8 x 7 1/2英寸"
  Combo1.AddItem "信封,3 5/8 x 6 1/2 英寸"
  Combo1.AddItem "U.S. 标准复写簿,14 7/8 x 11 英寸"
  Combo1.AddItem "德国标准复写簿,8 1/2 x 12 英寸"
  Combo1.AddItem "德国法律复写簿,8 1/2 x 13 英寸"
  Combo1.Text = "A4, 210 x 297 毫米"
  '添加进纸方式
  Combo2.AddItem "从上层纸盒进纸"
  Combo2.AddItem "从下层纸盒进纸"
  Combo2.AddItem "从中间纸盒进纸"
  Combo2.AddItem "等待手动插入每页纸"
  Combo2.AddItem "从信封进纸器进纸"
  Combo2.AddItem "从信封进纸器进纸;但要等待手动插入"
  Combo2.AddItem "(默认值)从当前默认纸盒进纸"
  Combo2.AddItem "从拖拉进纸器进纸"
  Combo2.AddItem "从小型进纸器进纸"
  Combo2.AddItem "从大型纸盒进纸"
  Combo2.AddItem "从大容量进纸器进纸"
  Combo2.ListIndex = 6
  '添加打印质量
  Combo3.AddItem "草稿分辨率"
  Combo3.AddItem "低分辨率"
  Combo3.AddItem "中等分辨率"
  Combo3.AddItem "高分辨率"
  Combo3.ListIndex = 3
End Sub

    相关声明:

      若“Vb打印机设置,包括纸张、纸型、打印质量等”有损您的权益,请告之我们删除内容。
      部分文章来源于网络,版权归原作者所有。