📄 files.frm
字号:
VERSION 5.00
Object = "{75D4F148-8785-11D3-93AD-0000832EF44D}#3.1#0"; "FAST2003.ocx"
Object = "{75D4F666-8785-11D3-93AD-0000832EF44D}#3.0#0"; "FAST2006.ocx"
Begin VB.Form frmFileVersion
BorderStyle = 3 'Fixed Dialog
Caption = "File information"
ClientHeight = 7905
ClientLeft = 2340
ClientTop = 2160
ClientWidth = 9375
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Icon = "Files.frx":0000
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 32.938
ScaleMode = 4 'Character
ScaleWidth = 78.125
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdProperties
Caption = "&Show Properties"
Height = 465
Left = 7155
TabIndex = 11
Top = 2880
Width = 2040
End
Begin VB.ListBox cboInfo
BackColor = &H8000000F&
BeginProperty Font
Name = "Courier New"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3660
Left = 135
TabIndex = 10
Top = 4140
Width = 9105
End
Begin VB.CommandButton cmdInformation
Caption = "&File Information"
Default = -1 'True
Height = 465
Left = 7140
TabIndex = 9
Top = 3510
Width = 2040
End
Begin VB.DriveListBox drvUnits
Height = 315
Left = 3465
TabIndex = 7
Top = 3645
Width = 3345
End
Begin VB.DirListBox dirDirectories
Height = 1890
Left = 3465
TabIndex = 5
Top = 1305
Width = 3375
End
Begin VB.FileListBox filFiles
Height = 3015
Left = 120
TabIndex = 3
Top = 984
Width = 3105
End
Begin VB.TextBox txtPattern
Height = 285
Left = 900
TabIndex = 1
Text = "*.*"
Top = 210
Width = 4785
End
Begin FLWDiskFile.FWFile objFile
Left = 8550
Top = 810
_ExtentX = 820
_ExtentY = 820
End
Begin FLWSystem.FWSysInfo objSysInfo
Left = 8520
Top = 240
_ExtentX = 820
_ExtentY = 820
End
Begin VB.Image imgImage
Height = 600
Left = 8460
Top = 1440
Width = 645
End
Begin VB.Label lblDirectory
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "c:\"
Height = 195
Left = 3465
TabIndex = 8
Top = 675
Width = 270
End
Begin VB.Label lblLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "&Units"
Height = 195
Index = 2
Left = 3465
TabIndex = 6
Top = 3420
Width = 450
End
Begin VB.Label lblLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "&Directories"
Height = 195
Index = 3
Left = 3465
TabIndex = 4
Top = 1035
Width = 930
End
Begin VB.Label lblLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "&Files"
Height = 195
Index = 0
Left = 135
TabIndex = 2
Top = 720
Width = 405
End
Begin VB.Label lblLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "File"
Height = 195
Index = 1
Left = 180
TabIndex = 0
Top = 255
Width = 315
End
End
Attribute VB_Name = "frmFileVersion"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Dim strBuffer As String
strBuffer = objSysInfo.Windows
dirDirectories.Path = strBuffer
filFiles.Path = strBuffer
drvUnits.Drive = Left$(strBuffer, 1)
End Sub
Private Sub dirDirectories_Change()
filFiles.Path = dirDirectories.Path
lblDirectory.Caption = filFiles.Path
End Sub
Private Sub drvUnits_Change()
dirDirectories.Path = drvUnits.Drive
filFiles.Path = dirDirectories.Path
lblDirectory.Caption = filFiles.Path
End Sub
Private Sub filFiles_Click()
Dim strFile As String
strFile = dirDirectories.Path
If VBA.Right$(strFile, 1) <> "\" Then
strFile = strFile & "\"
End If
txtPattern.Text = strFile & filFiles.FileName
End Sub
Private Sub filFiles_DblClick()
cmdInformation.Value = True
End Sub
Private Sub filFiles_PathChange()
txtPattern.Text = "*.*"
filFiles.Pattern = "*.*"
End Sub
Private Sub txtPattern_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
filFiles.Pattern = txtPattern.Text
KeyAscii = 0
If filFiles.ListCount = 1 Then
cmdInformation.Value = True
ElseIf filFiles.ListCount = 0 Then
Call MsgBox("There's no files with this conditions")
filFiles.Pattern = "*.*"
txtPattern.Text = "*.*"
End If
Call filFiles.SetFocus
End If
End Sub
Private Sub cmdVersion_Click()
cmdInformation.Value = True
End Sub
Private Function MyAnd(ByVal lngNumber1 As Long, _
ByVal lngNumber2 As Long) As Boolean
MyAnd = (lngNumber1 And lngNumber2) <> 0
End Function
Private Sub cmdProperties_Click()
If objFile.Create(txtPattern.Text) Then
Call objFile.ShowProperties(Me.hWnd)
End If
End Sub
Private Sub cmdInformation_Click()
Call cboInfo.Clear
If objFile.Create(txtPattern.Text) Then
With objFile
Call cboInfo.AddItem("Filename " & .FileName)
Call cboInfo.AddItem("Long name " & .LongName)
Call cboInfo.AddItem("Full Path " & .FullPath)
Call cboInfo.AddItem("Short name " & .ShortName)
Call cboInfo.AddItem("Short path " & .ShortPathName)
Call cboInfo.AddItem("Display name " & .DisplayName)
Call cboInfo.AddItem("Extension " & .Extension)
Call cboInfo.AddItem("Type name " & .TypeName)
Call cboInfo.AddItem("Size " & .FileSize)
Call cboInfo.AddItem("Formated size " & .FormatFileSize)
Call cboInfo.AddItem("Creation date " & .Creation)
Call cboInfo.AddItem("Last access " & .LastAccess)
Call cboInfo.AddItem("Modify date " & .Modify)
Set imgImage.Picture = .Icon
If .AvailableVersionInfo Then
Call cboInfo.AddItem("Filename " & .FileName)
Call cboInfo.AddItem("Description " & .Description)
Call cboInfo.AddItem("Version " & .FileVersion)
Call cboInfo.AddItem("File type " & .FileType & " - " & .FileTypeStr)
Call cboInfo.AddItem("File subtype " & .FileSubType & " - " & .FileSubTypeStr)
Call cboInfo.AddItem("Operating system " & .Environment & " - " & .EnvironmentStr)
Call cboInfo.AddItem("Company " & .Company)
Call cboInfo.AddItem("Language " & .Language)
Call cboInfo.AddItem("Product name " & .ProductName)
Call cboInfo.AddItem("Product version " & .ProductVersion)
Call cboInfo.AddItem("Internal name " & .InternalName)
Call cboInfo.AddItem("Original name " & .OriginalFilename)
Call cboInfo.AddItem("Copyright " & .LegalCopyright)
Call cboInfo.AddItem("Trademarks " & .LegalTrademarks)
Call cboInfo.AddItem("Build options " & .BuildOptions & " - " & .BuildOptionsStr)
Call cboInfo.AddItem("Comments " & .Comments)
Else
Call MsgBox("There's no version info about the file " & txtPattern.Text)
End If
End With
Else
Call MsgBox("There's no info about the file " & txtPattern.Text)
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -