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

📄 frmselectdir.frm

📁 1、以DLL形式提供医生工作站 2、 根据【检查项目】
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSelectDir 
   BackColor       =   &H00F1E7DA&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "选择刻录目录"
   ClientHeight    =   4515
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7305
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4515
   ScaleWidth      =   7305
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton btnCancel 
      Caption         =   "取消(&C)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5880
      TabIndex        =   5
      Top             =   4080
      Width           =   1335
   End
   Begin VB.DriveListBox drvSelect 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   120
      TabIndex        =   2
      Top             =   360
      Visible         =   0   'False
      Width           =   3255
   End
   Begin VB.CommandButton btnOk 
      Caption         =   "确定(&O)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4440
      TabIndex        =   1
      Top             =   4080
      Width           =   1335
   End
   Begin VB.DirListBox dirRecord 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2730
      Left            =   120
      TabIndex        =   0
      Top             =   1080
      Width           =   7095
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "请选择目录"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   840
      Width           =   2055
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请选择盘符"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   2055
   End
End
Attribute VB_Name = "frmSelectDir"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Dim strDir As String

Private Sub btnCancel_Click()
    On Error GoTo ErrHandler
    Unload Me
    
    Exit Sub
ErrHandler:
    Unload Me
End Sub

Private Sub btnOk_Click()
    'frmMain.strDir = dirRecord.Path
    On Error GoTo ErrHandler
    Dim nCount1 As Long
    Dim nCount2 As Long
    nCount1 = InStr(dirRecord.Path, "D:\DICOM")
    nCount2 = InStr(dirRecord.Path, "d:\dicom")
    If nCount1 <> 1 And nCount2 <> 1 Then
        MsgBox "请选择根目录为“d:\DICOM”的文件夹", vbExclamation, "提示"
        Exit Sub
    End If
    
    frmRecordCD.AddTreeNode dirRecord.Path
    Unload Me
    
    Exit Sub
ErrHandler:
    Unload Me
End Sub



Private Sub dirRecord_Change()
On Error GoTo ErrHandler
    Dim strPath As String
    Dim Mlenth As Long
    Dim DCMlenth As Long
    Mlenth = Len(dirRecord.Path)
    DCMlenth = Len(strDir)
    If InStr(dirRecord.Path, strDir) = 1 Then
        strPath = Right(dirRecord.Path, Mlenth - DCMlenth - 1)
        Dim nCount As Long
        nCount = InStr(strPath, "\")
        If nCount <> 0 Then
            dirRecord.Path = strDir + "\" + Left(strPath, nCount - 1)
        End If
    End If
    Exit Sub
ErrHandler:
    
End Sub

Private Sub drvSelect_Change()
    On Error GoTo ErrHandler
    Dim nCount As Long
    nCount = InStr(drvSelect.Drive, "d:")
    
    If nCount <> 1 Then
        'MsgBox "请选择根目录为“d:的文件夹", vbExclamation, "提示"
        
        drvSelect.Drive = "d:"
        Exit Sub
    End If
    
    dirRecord.Path = drvSelect.Drive
    
    
    Exit Sub
ErrHandler:
    
End Sub

Private Sub Form_Load()
On Error GoTo ErrHandler
    
    'drvSelect.Drive = "D:"
    'dirRecord.Path = drvSelect.Drive

    Dim nRet As Long
    strDir = Space(256)
    nRet = GetPrivateProfileString("WORKSTATION", "DCM_LOCAL_ROOT", "", _
        strDir, 256, App.Path + "\" + CONFIG_FILE_NAME)
    strDir = Left(strDir, nRet)
    
    If strDir = "" Then
        strDir = "127.0.0.1\D:DICOM"
    End If
    
    dirRecord.Path = strDir
    Exit Sub
ErrHandler:
End Sub

⌨️ 快捷键说明

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