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

📄 frmreportpreview.frm

📁 VB6.0编写的医院影像系统
💻 FRM
字号:
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.dll"
Begin VB.Form frmReportPreview 
   Caption         =   "打印预览 - 超声报告"
   ClientHeight    =   5220
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7755
   Icon            =   "frmReportPreview.frx":0000
   KeyPreview      =   -1  'True
   LockControls    =   -1  'True
   ScaleHeight     =   5220
   ScaleWidth      =   7755
   StartUpPosition =   2  'CenterScreen
   Begin VB.PictureBox Picture1 
      Align           =   1  'Align Top
      BorderStyle     =   0  'None
      Height          =   525
      Left            =   0
      ScaleHeight     =   525
      ScaleWidth      =   7755
      TabIndex        =   1
      Top             =   0
      Width           =   7755
      Begin VB.CommandButton cmdOption 
         Caption         =   "打印选项 [F4]"
         Height          =   390
         Left            =   2895
         TabIndex        =   5
         Tag             =   "应用(&A)"
         Top             =   75
         Width           =   1335
      End
      Begin VB.CommandButton cmdPrint 
         Caption         =   "打印 [F2]"
         Default         =   -1  'True
         Height          =   390
         Left            =   75
         TabIndex        =   4
         Tag             =   "确定"
         Top             =   75
         Width           =   1335
      End
      Begin VB.CommandButton cmdCancel 
         Cancel          =   -1  'True
         Caption         =   "取消 [ESC]"
         Height          =   390
         Left            =   4305
         TabIndex        =   3
         Tag             =   "取消"
         Top             =   75
         Width           =   1335
      End
      Begin VB.CommandButton cmdProp 
         Caption         =   "页面设置 [F3]"
         Height          =   390
         Left            =   1485
         TabIndex        =   2
         Tag             =   "应用(&A)"
         Top             =   75
         Width           =   1335
      End
   End
   Begin SHDocVwCtl.WebBrowser wbReport 
      Height          =   2235
      Left            =   330
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   975
      Width           =   3855
      ExtentX         =   6800
      ExtentY         =   3942
      ViewMode        =   1
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   1
      AutoArrange     =   -1  'True
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
End
Attribute VB_Name = "frmReportPreview"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public FileName As String       '要显示的文件名

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOption_Click()
    
    '----------------
    '显示打印选项
    '----------------
    
    With frmOptions
        Set .tabOptions.SelectedTab = .tabOptions.Tabs(4)
        frmOptions.Show vbModal
    End With
    
End Sub

Private Sub cmdPrint_Click()
    On Error Resume Next
    
    wbReport.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
End Sub

Private Sub cmdProp_Click()

    On Error Resume Next

    wbReport.ExecWB OLECMDID_PAGESETUP, OLECMDEXECOPT_DODEFAULT
    
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    
    '-------------------
    '处理快捷键
    '-------------------
    
    Select Case KeyCode
        Case vbKeyF2
            cmdPrint_Click
        Case vbKeyF3
            cmdProp_Click
        Case vbKeyF4
            cmdOption_Click
        Case vbKeyEscape
            cmdCancel_Click
        Case Else
    End Select
    
End Sub

Private Sub Form_Load()
    
    '----------------------
    '生成报告并显示
    '----------------------
    
    MaxForm Me
    
    If FSO.FileExists(FileName) Then
        wbReport.Navigate FileName
    End If
    
End Sub



Private Sub Form_Resize()
    On Error Resume Next
    wbReport.Move 0, Picture1.height, Me.ScaleWidth, Me.ScaleHeight - Picture1.height
End Sub

⌨️ 快捷键说明

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