📄 file.frm
字号:
VERSION 5.00
Begin VB.Form FrmShu
BorderStyle = 1 'Fixed Single
Caption = "文件属性"
ClientHeight = 1575
ClientLeft = 45
ClientTop = 435
ClientWidth = 4530
Icon = "file.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1575
ScaleWidth = 4530
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.CheckBox Check3
Caption = "系统"
Height = 255
Left = 2760
TabIndex = 9
Top = 1200
Width = 855
End
Begin VB.CheckBox Check2
Caption = "隐藏"
Height = 255
Left = 1740
TabIndex = 8
Top = 1200
Width = 855
End
Begin VB.CheckBox Check1
Caption = "只读"
Height = 255
Left = 720
TabIndex = 7
Top = 1200
Width = 855
End
Begin VB.TextBox Text3
Appearance = 0 'Flat
BackColor = &H8000000F&
Height = 270
Left = 1680
TabIndex = 6
Top = 705
Width = 2775
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
BackColor = &H8000000F&
Height = 240
Left = 1680
TabIndex = 4
Top = 390
Width = 2775
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H8000000F&
Height = 240
Left = 1680
TabIndex = 3
Top = 75
Width = 2775
End
Begin VB.PictureBox Picture1
Height = 540
Left = 45
ScaleHeight = 480
ScaleWidth = 525
TabIndex = 0
Top = 105
Width = 585
End
Begin VB.Label Label1
Caption = "创建日期:"
Height = 255
Left = 720
TabIndex = 5
Top = 720
Width = 975
End
Begin VB.Label Label3
Caption = "大小:"
Height = 255
Left = 720
TabIndex = 2
Top = 420
Width = 615
End
Begin VB.Label Label2
Caption = "文件:"
Height = 240
Left = 720
TabIndex = 1
Top = 105
Width = 615
End
End
Attribute VB_Name = "FrmShu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()
'On Error Resume Next
Dim filea As Long
If Check1.Value = 1 Then filea = filea + vbReadOnly
If Check2.Value = 1 Then filea = filea + vbHidden
If Check3.Value = 1 Then filea = filea + vbSystem
SetAttr FileName, filea
End Sub
Private Sub Check2_Click()
Call Check1_Click
End Sub
Private Sub Check3_Click()
Call Check1_Click
End Sub
Private Sub Form_Load()
On Error Resume Next
Picture1.Picture = FrmMain.Icon
If FileName = "" Then
Text1.Text = "未知,正在编辑中!"
Text2.Text = Text1.Text
Text3.Text = Now
Else
Text1.Text = FileName
Text2.Text = FileLen(FileName) & " 字节"
Text3.Text = FileDateTime(FileName)
Dim filea As Long
filea = GetAttr(FileName)
If filea = vbReadOnly Or filea = 3 Or filea = 5 Or filea = 7 Then Check1.Value = 1
If filea = vbHide Or filea = 3 Or filea = 6 Or filea = 7 Then Check2.Value = 1
If filea = vbSystem Or filea = 5 Or filea = 6 Or filea = 7 Then Check3.Value = 1
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -