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

📄 frmprintbutton.frm

📁 1、以DLL形式提供医生工作站 2、 根据【检查项目】
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPrintButton 
   BorderStyle     =   0  'None
   Caption         =   "ButtonPrint"
   ClientHeight    =   405
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   1575
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   405
   ScaleWidth      =   1575
   ShowInTaskbar   =   0   'False
   Begin VB.Timer tmrPrintButton 
      Interval        =   100
      Left            =   720
      Top             =   0
   End
   Begin VB.CommandButton btnPrint 
      Caption         =   "打印"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   390
      Left            =   -15
      TabIndex        =   1
      Top             =   0
      Width           =   720
   End
   Begin VB.CommandButton btnBack 
      Caption         =   "返回"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   840
      TabIndex        =   0
      Top             =   15
      Width           =   705
   End
End
Attribute VB_Name = "frmPrintButton"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'------------------------------------------------------------------------------------
'文件:frmPrintButton.frm
'作者:刘辉
'时间:2008-09-07
'说明:打印--保存和返回按钮
'------------------------------------------------------------------------------------
Option Explicit


Private Sub btnPrint_Click()
On Error GoTo ErrHandler
    tmrPrintButton.Enabled = False
'    frmReportEdit.btnLookPhoto.Enabled = True
'    frmReportEdit.btnBack.Enabled = True
    'frmReportEdit.frmPatientInfo.Enabled = True
    frmReportEdit.frmReport.Enabled = True
    Unload PRNReport_CT
    Unload frmPrintButton
    'Call frmReportEdit.getPrinterInfo
    Call frmReportEdit.print_Report
    Exit Sub
ErrHandler:
End Sub

Private Sub btnBack_Click()
On Error GoTo ErrHandler
    tmrPrintButton.Enabled = False
    frmReportEdit.frmPatientInfo.Enabled = True
    frmReportEdit.frmReport.Enabled = True
    Unload frmPrintButton
    Unload PRNReport_CT
    frmReportEdit.SetFocus
    Exit Sub
ErrHandler:
End Sub

'Private Sub Form_Activate()
'On Error GoTo ErrHandler
'    Dim myval As Long
'    myval = SetWindowPos(frmPrintButton.hwnd, -1, 0, 0, 0, 0, SWP_NOSIZE)
'
'    Exit Sub
'ErrHandler:
'End Sub

Private Sub Form_Load()
On Error GoTo ErrHandler
    Dim myval As Long
    myval = SetWindowPos(frmPrintButton.hWnd, -1, 0, 0, 0, 0, SWP_NOSIZE)
    Exit Sub
ErrHandler:
End Sub

'Private Sub Form_LostFocus()
'On Error GoTo ErrHandler
'    Dim hwnd As Long
'    Dim strProcessName As String * 255
'    hwnd = GetForegroundWindow()
'    If hwnd <> 0 Then
'        Dim lenth As Integer
'        lenth = Len(strProcessName) - 1
'        lenth = GetWindowText(hwnd, strProcessName, lenth)
'        If lenth = 0 Then
'            MsgBox "获取进程名失败!", vbExclamation, "提示"
'            Exit Sub
'        End If
'
'        If InStr(strProcessName, "HT-CT") <> 1 Then
'            MsgBox strProcessName, vbExclamation, "提示"
'
'            Exit Sub
'            Unload Me
'        End If
'    End If
'    Exit Sub
'ErrHandler:
'    MsgBox Err.Description, vbExclamation, "提示"
'End Sub

Private Sub tmrPrintButton_Timer()
On Error GoTo ErrHandler
    Dim hWnd As Long
    Dim strProcessName As String * 255
    hWnd = GetForegroundWindow()
    If hWnd <> 0 Then
        Dim lenth As Integer
        lenth = Len(strProcessName) - 1
        lenth = GetWindowText(hWnd, strProcessName, lenth)
        If lenth = 0 Then
            'MsgBox "获取进程名失败!", vbExclamation, "提示"
            Exit Sub
        End If
        
        lenth = InStr(strProcessName, "打印报告单")
'        If lenth = 1 Then
'            frmPrintButton.Show
'            PRNReport_CT.Show
'            PRNReport_CT.SetFocus
'        End If
'        lenth = InStr(strProcessName, "ButtonPrint")
'        If lenth = 1 Then
'        End If
        If lenth = 0 Then
                lenth = InStr(strProcessName, "HT-CT")
                If lenth = 1 Then
                    'MsgBox strProcessName, vbExclamation, "提示"
                
                    frmPrintButton.Show
                    PRNReport_CT.Show
                    PRNReport_CT.SetFocus
                    Exit Sub
                End If
        End If
        
        lenth = InStr(strProcessName, "打印报告单")
        If lenth <> 1 Then
            lenth = InStr(strProcessName, "ButtonPrint")
            If lenth <> 1 Then
                frmPrintButton.Hide
                PRNReport_CT.Hide
            End If
        End If
    End If
    Exit Sub
ErrHandler:

End Sub

⌨️ 快捷键说明

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