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

📄 form2.frm

📁 一个很好用的报表控件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{C4847593-972C-11D0-9567-00A0C9273C2A}#8.0#0"; "crviewer.dll"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "Comctl32.ocx"
Begin VB.Form Form2 
   Caption         =   "Form2"
   ClientHeight    =   4785
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   8460
   LinkTopic       =   "Form2"
   ScaleHeight     =   4785
   ScaleWidth      =   8460
   StartUpPosition =   3  'Windows Default
   Begin ComctlLib.Toolbar Toolbar 
      Align           =   1  'Align Top
      Height          =   420
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   8460
      _ExtentX        =   14923
      _ExtentY        =   741
      ButtonWidth     =   635
      ButtonHeight    =   582
      Appearance      =   1
      _Version        =   327682
      BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7} 
         NumButtons      =   12
         BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
            Style           =   4
            Object.Width           =   1300
         EndProperty
         BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
            Style           =   4
            Object.Width           =   500
         EndProperty
         BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button11 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
            Style           =   4
            Object.Width           =   2250
         EndProperty
         BeginProperty Button12 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
      EndProperty
      Begin VB.ComboBox cboSearch 
         Height          =   315
         Left            =   6000
         TabIndex        =   4
         Top             =   0
         Width           =   855
      End
      Begin VB.ComboBox cboZoom 
         Height          =   315
         Left            =   4800
         TabIndex        =   3
         Top             =   0
         Width           =   975
      End
      Begin VB.TextBox txtCurPage 
         Height          =   285
         Left            =   1320
         TabIndex        =   2
         Text            =   "0"
         Top             =   120
         Width           =   615
      End
   End
   Begin ComctlLib.StatusBar StatusBar 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   5
      Top             =   4410
      Width           =   8460
      _ExtentX        =   14923
      _ExtentY        =   661
      Style           =   1
      SimpleText      =   ""
      _Version        =   327682
      BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
         NumPanels       =   1
         BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
      EndProperty
   End
   Begin CRVIEWERLibCtl.CRViewer CRViewer1 
      Height          =   3645
      Left            =   120
      TabIndex        =   0
      Top             =   600
      Width           =   7965
      DisplayGroupTree=   -1  'True
      DisplayToolbar  =   -1  'True
      EnableGroupTree =   -1  'True
      EnableNavigationControls=   -1  'True
      EnableStopButton=   -1  'True
      EnablePrintButton=   -1  'True
      EnableZoomControl=   -1  'True
      EnableCloseButton=   -1  'True
      EnableProgressControl=   -1  'True
      EnableSearchControl=   -1  'True
      EnableRefreshButton=   0   'False
      EnableDrillDown =   -1  'True
      EnableAnimationControl=   0   'False
      EnableSelectExpertButton=   0   'False
      EnableToolbar   =   -1  'True
      DisplayBorder   =   0   'False
      DisplayTabs     =   -1  'True
      DisplayBackgroundEdge=   -1  'True
      SelectionFormula=   ""
      EnablePopupMenu =   -1  'True
      EnableExportButton=   0   'False
      EnableSearchExpertButton=   0   'False
      EnableHelpButton=   0   'False
   End
   Begin ComctlLib.ImageList ImgLst 
      Left            =   6480
      Top             =   2640
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      MaskColor       =   12632256
      _Version        =   327682
   End
   Begin VB.Menu mnuView 
      Caption         =   "View"
      Begin VB.Menu mnuCustomToolbar 
         Caption         =   "Display Custom Toolbar"
         Checked         =   -1  'True
      End
      Begin VB.Menu mnuCRToolbar 
         Caption         =   "Display Crystal Toolbar"
         Checked         =   -1  'True
      End
      Begin VB.Menu mnuDisplayGroupTree 
         Caption         =   "Display Group Tree"
         Checked         =   -1  'True
      End
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' *************************************************************
' Purpose: Demonstrate how the Viewer can be controlled using external
'          controls
'
Option Explicit
' Module Constants
Const TOP_VIEW As Integer = 1 ' const used to determine Parent view
' These constants are used for setting the buttons in the toolbar
Const CLOSE_BUT As Integer = 1
Const FIRSTPAGE_BUT As Integer = 2
Const PREVPAGE_BUT As Integer = 3
Const NEXTPAGE_BUT As Integer = 5
Const LASTPAGE_BUT As Integer = 6
Const PRINT_BUT As Integer = 8
Const REFRESH_BUT As Integer = 9
Const GROUPTREE_BUT As Integer = 10
Const SEARCH_BUT As Integer = 12
Dim Report As New CrystalReport1
' *************************************************************
' Enables/Disables toolbar depending upon the parameter State
'
Private Sub mEnableCloseButton(State As Boolean)
    Dim CloseButton As Button
    Set CloseButton = Toolbar.Buttons(CLOSE_BUT)
    CloseButton.Enabled = State
    Set CloseButton = Nothing
End Sub
' *************************************************************
' Calls Smart Viewer Zoom method to set the zoom percentage according
' to the user's choice
'
Private Sub cboZoom_Click()
Dim strZmPcnt As String
    strZmPcnt = mstrGetZoomPercentage
    CRViewer1.Zoom (CInt(strZmPcnt))
End Sub
Private Sub CRViewer1_GroupTreeButtonClicked(ByVal Visible As Boolean)
Call mSetGroupTree
End Sub
Private Sub CRViewer1_ViewChanged(ByVal oldViewIndex As Long, ByVal newViewIndex As Long)
If newViewIndex = (TOP_VIEW - 1) Then
        mEnableCloseButton False
    Else
        mEnableCloseButton True
    End If
End Sub
' *************************************************************
' Displays the zoom percentage in dropdown box
'
Private Sub mSetZoomLevelOnControl(strZoomLevel As String)
        Dim indx As Integer
        Select Case strZoomLevel
        Case "1"  'Page Width

⌨️ 快捷键说明

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