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

📄 frmpreview.frm

📁 This application provides much functionality for creating data-driven reports, including preview, gr
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmPreview 
   Caption         =   "Print Preview"
   ClientHeight    =   5370
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7980
   Icon            =   "frmPreview.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   94.721
   ScaleMode       =   6  'Millimeter
   ScaleWidth      =   140.758
   StartUpPosition =   2  'CenterScreen
   WindowState     =   2  'Maximized
   Begin MSComctlLib.ImageList imlDisabled 
      Left            =   660
      Top             =   390
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   4
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":000C
            Key             =   "f"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":03A8
            Key             =   "p"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":0744
            Key             =   "n"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":0AE0
            Key             =   "l"
         EndProperty
      EndProperty
   End
   Begin VB.HScrollBar HS 
      Height          =   255
      LargeChange     =   10
      Left            =   11339
      Max             =   100
      TabIndex        =   6
      TabStop         =   0   'False
      Top             =   3660
      Value           =   50
      Width           =   1995
   End
   Begin VB.VScrollBar VS 
      Height          =   1995
      LargeChange     =   10
      Left            =   11339
      Max             =   100
      TabIndex        =   5
      TabStop         =   0   'False
      Top             =   660
      Value           =   50
      Width           =   255
   End
   Begin MSComctlLib.Toolbar tbToolBar 
      Align           =   1  'Align Top
      Height          =   330
      Left            =   0
      TabIndex        =   7
      Top             =   0
      Width           =   7980
      _ExtentX        =   14076
      _ExtentY        =   582
      ButtonWidth     =   609
      ButtonHeight    =   582
      ToolTips        =   0   'False
      AllowCustomize  =   0   'False
      Wrappable       =   0   'False
      Style           =   1
      ImageList       =   "imlNormal"
      DisabledImageList=   "imlDisabled"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   14
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Key             =   "first"
            Object.Tag             =   "first"
            ImageKey        =   "f"
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Key             =   "previous"
            Object.Tag             =   "previous"
            ImageKey        =   "p"
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   4
            Object.Width           =   22
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Key             =   "next"
            Object.Tag             =   "next"
            ImageKey        =   "n"
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Key             =   "last"
            Object.Tag             =   "last"
            ImageKey        =   "l"
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "goto"
            ImageKey        =   "g"
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   4
            Object.Width           =   13.8
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   4
            Object.Width           =   33.2
         EndProperty
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "print"
            Object.Tag             =   "print"
            ImageKey        =   "pr"
         EndProperty
         BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "info"
            ImageKey        =   "i"
         EndProperty
      EndProperty
      Begin MSComctlLib.ImageCombo cboZoom 
         Height          =   330
         Left            =   4005
         TabIndex        =   1
         Top             =   0
         Width           =   1860
         _ExtentX        =   3281
         _ExtentY        =   582
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         MousePointer    =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   204
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Locked          =   -1  'True
      End
      Begin VB.TextBox txtStatus 
         Alignment       =   2  'Center
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   710
         TabIndex        =   8
         Top             =   20
         Width           =   1180
      End
      Begin VB.TextBox txtGoto 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   204
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   3140
         MaxLength       =   3
         TabIndex        =   0
         Text            =   "1"
         Top             =   20
         Width           =   700
      End
      Begin VB.CommandButton cmdClose 
         Appearance      =   0  'Flat
         Cancel          =   -1  'True
         Caption         =   "Close"
         Height          =   345
         Left            =   7050
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   0
         Width           =   900
      End
   End
   Begin MSComctlLib.ImageList imlNormal 
      Left            =   60
      Top             =   390
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   7
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":0E7C
            Key             =   "f"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":1218
            Key             =   "p"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":15B4
            Key             =   "n"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":1950
            Key             =   "l"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":1CEC
            Key             =   "g"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":2140
            Key             =   "pr"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmPreview.frx":24DC
            Key             =   "i"
         EndProperty
      EndProperty
   End
   Begin VB.PictureBox picContainer 
      BackColor       =   &H8000000C&
      FillColor       =   &H8000000F&
      Height          =   11339
      Left            =   0
      ScaleHeight     =   198.967
      ScaleMode       =   6  'Millimeter
      ScaleWidth      =   248.973
      TabIndex        =   3
      TabStop         =   0   'False
      Top             =   360
      Width           =   14174
      Begin VB.PictureBox picPage 
         Appearance      =   0  'Flat
         AutoRedraw      =   -1  'True
         BackColor       =   &H80000005&
         CausesValidation=   0   'False
         ForeColor       =   &H80000008&
         Height          =   2415
         Left            =   3675
         MousePointer    =   99  'Custom
         ScaleHeight     =   42.069
         ScaleMode       =   6  'Millimeter
         ScaleWidth      =   49.477
         TabIndex        =   4
         TabStop         =   0   'False
         Top             =   17008
         Width           =   2835
      End
   End
   Begin VB.PictureBox picLogo 
      AutoRedraw      =   -1  'True
      Height          =   1050
      Left            =   600
      Picture         =   "frmPreview.frx":2878
      ScaleHeight     =   990
      ScaleWidth      =   2565
      TabIndex        =   9
      Top             =   1200
      Width           =   2625
   End
   Begin VB.Image imgCursor 
      Height          =   480
      Index           =   6
      Left            =   60
      Picture         =   "frmPreview.frx":3600
      Top             =   540
      Width           =   480
   End
   Begin VB.Image imgCursor 
      Height          =   480
      Index           =   5
      Left            =   60
      Picture         =   "frmPreview.frx":390A
      Top             =   540
      Width           =   480
   End
   Begin VB.Image imgCursor 
      Height          =   480
      Index           =   4
      Left            =   60
      Picture         =   "frmPreview.frx":3C14
      Top             =   540
      Width           =   480
   End
   Begin VB.Image imgCursor 
      Height          =   480
      Index           =   3
      Left            =   60
      Picture         =   "frmPreview.frx":3F1E
      Top             =   540
      Width           =   480
   End
   Begin VB.Image imgCursor 
      Height          =   480
      Index           =   2
      Left            =   60
      Picture         =   "frmPreview.frx":4228
      Top             =   540
      Width           =   480
   End
   Begin VB.Image imgCursor 
      Height          =   480
      Index           =   1
      Left            =   60
      Picture         =   "frmPreview.frx":4532
      Top             =   540
      Width           =   480
   End
End
Attribute VB_Name = "frmPreview"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private fIsLoaded As Boolean, fMoving As Boolean, lngHWnd As Long
Private X_ As Single, Y_ As Single
Private intCurPage As Integer, intPagesCount As Integer
Private oldZoom As Single, oldCurPage As Integer, oldPW As Single, oldPH As Single

Private w As Single, h As Single
Private IndentX_mm As Long, IndentY_mm As Long

Private Type POINTAPI
    X As Long
    Y As Long
End Type

Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hWndLock As Long) As Long

Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Private Declare Function SetRectEmpty Lib "user32" (lpRect As RECT) As Long
Private Declare Function OffsetRect Lib "user32" (lpRect As RECT, ByVal X As Long, ByVal Y As Long) As Long
Private Declare Function CopyRect Lib "user32" (lpDestRect As RECT, lpSourceRect As RECT) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, lpRect As RECT) As Long
Private Declare Function DrawAnimatedRects Lib "user32" (ByVal hWnd As Long, ByVal idAni As Long, lprcFrom As RECT, lprcTo As RECT) As Long


Private Sub cboZoom_Click()
Dim sngZoom As Single, sngCoeff As Single
Dim cw As Single, ch As Single
Dim pw As Single, ph As Single

    If fIsLoaded Then
        Me.MousePointer = vbHourglass

        Call LockWindowUpdate(lngHWnd)
        sngZoom = Val(cboZoom.SelectedItem.Tag) / 100

        cw = picContainer.Width
        ch = picContainer.Height

⌨️ 快捷键说明

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