⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmprint.frm

📁 此为vb6做的报表打印控件源码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmPrint 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "打印设置"
   ClientHeight    =   4725
   ClientLeft      =   45
   ClientTop       =   270
   ClientWidth     =   6030
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4725
   ScaleWidth      =   6030
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame frm页边距 
      Caption         =   "页边距"
      Height          =   1005
      Left            =   420
      TabIndex        =   16
      Top             =   1860
      Width           =   5385
      Begin VB.TextBox ctxtMargin 
         Height          =   345
         Index           =   3
         Left            =   3450
         TabIndex        =   24
         Text            =   "Text1"
         Top             =   600
         Width           =   1005
      End
      Begin VB.TextBox ctxtMargin 
         Height          =   345
         Index           =   2
         Left            =   3450
         TabIndex        =   23
         Text            =   "Text1"
         Top             =   180
         Width           =   1005
      End
      Begin VB.TextBox ctxtMargin 
         Height          =   345
         Index           =   1
         Left            =   1170
         TabIndex        =   22
         Text            =   "Text1"
         Top             =   600
         Width           =   1005
      End
      Begin VB.TextBox ctxtMargin 
         Height          =   345
         Index           =   0
         Left            =   1170
         TabIndex        =   19
         Text            =   "Text1"
         Top             =   150
         Width           =   1005
      End
      Begin VB.Label Label4 
         Caption         =   "下边距"
         Height          =   255
         Index           =   2
         Left            =   2790
         TabIndex        =   21
         Top             =   690
         Width           =   885
      End
      Begin VB.Label Label4 
         Caption         =   "上边距"
         Height          =   255
         Index           =   1
         Left            =   2760
         TabIndex        =   20
         Top             =   240
         Width           =   885
      End
      Begin VB.Label Label5 
         Caption         =   "右边距"
         Height          =   315
         Left            =   510
         TabIndex        =   18
         Top             =   660
         Width           =   555
      End
      Begin VB.Label Label4 
         Caption         =   "左边距"
         Height          =   255
         Index           =   0
         Left            =   510
         TabIndex        =   17
         Top             =   240
         Width           =   885
      End
   End
   Begin VB.CommandButton ccmdOK 
      Caption         =   "(&O)确定"
      Height          =   375
      Left            =   4890
      TabIndex        =   6
      Top             =   4260
      Width           =   975
   End
   Begin VB.Frame Frame2 
      Caption         =   "自定义"
      Height          =   1095
      Left            =   450
      TabIndex        =   1
      Top             =   3000
      Width           =   5385
      Begin VB.OptionButton Option2 
         Caption         =   "毫米(&M)"
         Enabled         =   0   'False
         Height          =   255
         Left            =   2760
         TabIndex        =   13
         Top             =   720
         Value           =   -1  'True
         Width           =   1215
      End
      Begin VB.OptionButton Option1 
         Caption         =   "英寸(&I)"
         Enabled         =   0   'False
         Height          =   255
         Left            =   2760
         TabIndex        =   12
         Top             =   240
         Width           =   1215
      End
      Begin VB.TextBox ctxtPaperWidth 
         BackColor       =   &H80000004&
         Enabled         =   0   'False
         Height          =   270
         Left            =   1080
         TabIndex        =   11
         Top             =   720
         Width           =   1335
      End
      Begin VB.TextBox ctxtPaperHeight 
         BackColor       =   &H80000004&
         Enabled         =   0   'False
         Height          =   270
         Left            =   1080
         TabIndex        =   8
         Top             =   240
         Width           =   1335
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "宽度"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   720
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "高度"
         Height          =   180
         Left            =   240
         TabIndex        =   9
         Top             =   240
         Width           =   360
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "打印"
      Height          =   1575
      Left            =   480
      TabIndex        =   0
      Top             =   120
      Width           =   5355
      Begin VB.OptionButton copt横向 
         Caption         =   "横向(&L)"
         Height          =   255
         Left            =   4200
         TabIndex        =   15
         Top             =   1170
         Width           =   1065
      End
      Begin VB.OptionButton copt纵向 
         Caption         =   "纵向(&P)"
         Height          =   255
         Left            =   4200
         TabIndex        =   14
         Top             =   720
         Value           =   -1  'True
         Width           =   1065
      End
      Begin VB.CheckBox cchkUserPaper 
         Caption         =   "自定义纸张(&U)"
         Height          =   255
         Left            =   2340
         TabIndex        =   7
         Top             =   1170
         Width           =   1725
      End
      Begin VB.ComboBox ccboPaper 
         Height          =   300
         Left            =   840
         Style           =   2  'Dropdown List
         TabIndex        =   5
         Top             =   840
         Width           =   3135
      End
      Begin VB.ComboBox ccboPrinter 
         Height          =   300
         Left            =   840
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   360
         Width           =   3135
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "纸张"
         Height          =   180
         Left            =   120
         TabIndex        =   3
         Top             =   840
         Width           =   360
      End
      Begin VB.Label clblPrint 
         Caption         =   "打印机"
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   360
         Width           =   615
      End
   End
End
Attribute VB_Name = "frmPrint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public mctlPrinter As vsPrinter

Dim d(41) As String
Dim i As Integer
Dim j As Integer
Dim mbolEventLock As Boolean

Private Sub ccboPaper_Click()
    If mbolEventLock = False Then
    mctlPrinter.PaperSize = ccboPaper.ItemData(ccboPaper.ListIndex)
    End If
End Sub

Private Sub ccboPrinter_Click()
    If mbolEventLock = False Then
    subShowPaper
    End If
End Sub

Private Sub cchkUserPaper_Click()
    If cchkUserPaper.Value <> 0 Then
        ctxtPaperWidth.Enabled = True
        ctxtPaperHeight.Enabled = True
        ctxtPaperWidth.BackColor = vbWhite
        ctxtPaperHeight.BackColor = vbWhite
        Option1.Enabled = True
        Option2.Enabled = True

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -