?? frmselectdir.frm
字號(hào):
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 = "請(qǐng)選擇目錄"
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 = "請(qǐng)選擇盤(pán)符"
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 "請(qǐng)選擇根目錄為“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 "請(qǐng)選擇根目錄為“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
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -