7,785
社区成员




Dim oDLG
Dim pth As String
Dim Flname As String
Dim objTIFF As Object
Dim shl As Shell32.Shell
Dim shfd As Shell32.Folder
Dim s As String
Dim i As Integer
Set oDLG = CreateObject("MSComDlg.CommonDialog")
oDLG.DialogTitle = "打开文件"
oDLG.Filter = "所有文件|*.*"
oDLG.MaxFileSize = 255
oDLG.ShowOpen
If oDLG.FileName <> "" Then
i = InStrRev(oDLG.FileName, "\")
If i = 0 Then Exit Sub
Flname = UCase(Mid(oDLG.FileName, i + 1))
Set shl = New Shell
Set shfd = shl.NameSpace(Left(oDLG.FileName, i - 1))
'注意文件不能被占用,如果占用则取不到正确值
For i = 0 To 500
If shfd.GetDetailsOf(1, i) <> "" Then
s = s & i & ":" & shfd.GetDetailsOf(0, i) & ": " & shfd.GetDetailsOf(shfd.Items.Item(Flname), i) & vbCrLf
If shfd.GetDetailsOf(1, i) = "位深度" Then
MsgBox "位深度:" & shfd.GetDetailsOf(shfd.Items.Item(Flname), i)
End If
Else
Exit For
End If
Next i
Text1.Text = s
End If
Set oDLG = Nothing