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

📄 frmprint.frm

📁 水质模糊综合评价系统 水质模糊综合评价系统 水质模糊综合评价系统
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form FrmPrint 
   Caption         =   "打印窗口"
   ClientHeight    =   4380
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7290
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4380
   ScaleWidth      =   7290
   StartUpPosition =   1  '所有者中心
   Begin VB.ComboBox Combo2 
      Height          =   300
      ItemData        =   "FrmPrint.frx":0000
      Left            =   3000
      List            =   "FrmPrint.frx":000A
      TabIndex        =   10
      Top             =   600
      Width           =   3615
   End
   Begin MSComDlg.CommonDialog cd 
      Left            =   6720
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Caption         =   "打印选择"
      Height          =   2295
      Left            =   2400
      TabIndex        =   3
      Top             =   1200
      Width           =   4335
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1320
         MaxLength       =   20
         TabIndex        =   8
         Top             =   1560
         Width           =   2775
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1320
         MaxLength       =   20
         TabIndex        =   7
         Top             =   720
         Width           =   2775
      End
      Begin VB.CheckBox chkshowdialog 
         Caption         =   "显示打印对话框"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   4
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Label2 
         Caption         =   "打印到"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   6
         Top             =   1560
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "首页 "
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   5
         Top             =   720
         Width           =   735
      End
   End
   Begin VB.CommandButton Command4 
      Caption         =   "退      出"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   2
      Top             =   3000
      Width           =   1575
   End
   Begin VB.CommandButton Command2 
      Caption         =   "打     印"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   1
      Top             =   2160
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "预     览"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   0
      Top             =   1200
      Width           =   1575
   End
   Begin VB.Label Label6 
      Caption         =   "打印内容选择"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   720
      TabIndex        =   9
      Top             =   480
      Width           =   1455
   End
End
Attribute VB_Name = "FrmPrint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
'DRpwushui1.StartUpPosition = 0
DrpPollutedWater.WindowState = 2
If Combo2.Text = "河口水数据统计" Then
DrpRiver.Show
ElseIf Combo2.Text = "水污染数据统计" Then
DrpPollutedWater.Show
Else
MsgBox "请选择打印内容!", vbOKOnly + vbInformation, "打印提示"
End If
End Sub

Private Sub Command2_Click()
Dim freturn As Long
If Combo2.Text <> "" Then
If Combo2.Text = "水污染数据统计" Then
If Text1.Text <> "" Or Text2.Text <> "" Then
If IsNumeric(Text1.Text) = False Or _
   IsNumeric(Text2.Text) = False Then
   MsgBox "首页或者结束页不存在", 64
    Exit Sub
   End If
   End If
   If Text1.Text = "" And Text2.Text = "" Then
   '调用PrintReport方法来直接在打印机上打印报表
   freturn = DrpPollutedWater.PrintReport(chkshowdialog.Value * _
  -1, rptRangeAllPages)
  Else
   freturn = DrpPollutedWater.PrintReport(chkshowdialog.Value * _
  -1, Text1.Text, Text2.Text)
  End If
  If freturn = 2 Then
  MsgBox "打印到打印机"
  End If
  ElseIf Combo2.Text = "河口水数据统计" Then
  If Text1.Text <> "" Or Text2.Text <> "" Then
If IsNumeric(Text1.Text) = False Or _
   IsNumeric(Text2.Text) = False Then
   MsgBox "首页或者结束页不存在", 64
    Exit Sub
   End If
   End If
   If Text1.Text = "" And Text2.Text = "" Then
   freturn = DrpRiver.PrintReport(chkshowdialog.Value * _
  -1, rptRangeAllPages)
  Else
   freturn = DrpRiver.PrintReport(chkshowdialog.Value * _
  -1, Text1.Text, Text2.Text)
  End If
  If freturn = 2 Then
  MsgBox "打印到打印机"
  End If
  
  Else
  MsgBox "打印取消"
   End If
   Else
   MsgBox "请选择打印对象", vbOKOnly, "警告!"
   End If
   End Sub
Private Sub Command4_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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