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

📄 dlgselectguider.frm

📁 本系统可用于医院和专业体检中心的健康体检管理
💻 FRM
字号:
VERSION 5.00
Object = "{0B81E4A9-BE4E-4AEF-9272-33AB5B51C6FC}#1.0#0"; "XPControls.ocx"
Begin VB.Form dlgSelectGuider 
   BackColor       =   &H80000018&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "选择要打印的导引单种类"
   ClientHeight    =   4515
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   5715
   Icon            =   "dlgSelectGuider.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4515
   ScaleWidth      =   5715
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      BackColor       =   &H80000018&
      Height          =   3015
      Left            =   570
      TabIndex        =   1
      Top             =   570
      Width           =   4515
      Begin VB.ListBox lstGuider 
         Height          =   2370
         Left            =   240
         Style           =   1  'Checkbox
         TabIndex        =   4
         Top             =   270
         Width           =   2895
      End
      Begin XPControls.XPCommandButton cmdSelectAll 
         Height          =   315
         Left            =   3450
         TabIndex        =   5
         Top             =   630
         Width           =   735
         _ExtentX        =   1296
         _ExtentY        =   556
         Caption         =   "全  选"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin XPControls.XPCommandButton cmdUnselectAll 
         Height          =   315
         Left            =   3450
         TabIndex        =   6
         Top             =   1320
         Width           =   735
         _ExtentX        =   1296
         _ExtentY        =   556
         Caption         =   "全不选"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin XPControls.XPCommandButton cmdConverseSelect 
         Height          =   315
         Left            =   3450
         TabIndex        =   7
         Top             =   2010
         Width           =   735
         _ExtentX        =   1296
         _ExtentY        =   556
         Caption         =   "反  选"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
   End
   Begin XPControls.XPCommandButton cmdCancel 
      Cancel          =   -1  'True
      Height          =   405
      Left            =   3180
      TabIndex        =   2
      Top             =   3840
      Width           =   1035
      _ExtentX        =   1826
      _ExtentY        =   714
      Caption         =   "取消(&C)"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin XPControls.XPCommandButton cmdOK 
      Default         =   -1  'True
      Height          =   405
      Left            =   1620
      TabIndex        =   3
      Top             =   3840
      Width           =   1035
      _ExtentX        =   1826
      _ExtentY        =   714
      Caption         =   "确定(&O)"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请在要打印的导引单前面打√"
      Height          =   285
      Left            =   600
      TabIndex        =   0
      Top             =   180
      Width           =   4455
   End
End
Attribute VB_Name = "dlgSelectGuider"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim m_strSelectedIndex As String

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdConverseSelect_Click()
    Dim i As Integer
    
    For i = 0 To lstGuider.ListCount - 1
        lstGuider.Selected(i) = Not lstGuider.Selected(i)
    Next i
End Sub

Private Sub cmdOK_Click()
    Dim i As Integer
    
    With lstGuider
        For i = 0 To .ListCount - 1
            If .Selected(i) Then
                m_strSelectedIndex = m_strSelectedIndex & CStr(.ItemData(i)) & ","
            End If
        Next
    End With
    
    '检查是否有选择
    If m_strSelectedIndex = "" Then
        MsgBox "请选择要打印的导引单种类!", vbInformation, "提示"
        lstGuider.SetFocus
        GoTo ExitLab
    End If
    '截掉最后的逗号
    m_strSelectedIndex = Left(m_strSelectedIndex, Len(m_strSelectedIndex) - 1)
    
    '返回到主调函数
    Unload Me

ExitLab:
    '
End Sub

Private Sub cmdSelectAll_Click()
    Dim i As Integer
    
    For i = 0 To lstGuider.ListCount - 1
        lstGuider.Selected(i) = True
    Next i
End Sub

Private Sub cmdUnselectAll_Click()
    Dim i As Integer
    
    For i = 0 To lstGuider.ListCount - 1
        lstGuider.Selected(i) = False
    Next i
End Sub

'***********************************************************************
'被调函数
'***********************************************************************
Public Function ShowGuiders(ByRef strGuiders() As String) As String
    Dim i As Integer
    
    '添加所有导引单模式
    With lstGuider
        For i = LBound(strGuiders) To UBound(strGuiders)
            .AddItem strGuiders(i)
            .ItemData(.NewIndex) = i
            .Selected(.NewIndex) = True '默认全选
        Next i
    End With
    
    '模态显示
    Me.Show vbModal
    
    ShowGuiders = m_strSelectedIndex
End Function

Private Sub Form_Activate()
    cmdOK.SetFocus
End Sub

⌨️ 快捷键说明

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