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

📄 attrform.frm

📁 采用vb写的资料系统管理器功能特别
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Height          =   255
         Left            =   2640
         TabIndex        =   4
         Top             =   4440
         Width           =   1215
      End
      Begin VB.CheckBox chkhidefl 
         Caption         =   "隐藏"
         Height          =   255
         Left            =   1320
         TabIndex        =   3
         Top             =   4440
         Width           =   975
      End
      Begin VB.CheckBox chkarchivefl 
         Caption         =   "存档"
         Height          =   255
         Left            =   2640
         TabIndex        =   2
         Top             =   4080
         Width           =   975
      End
      Begin VB.CheckBox chkreadfl 
         Caption         =   "只读"
         Height          =   255
         Left            =   1320
         TabIndex        =   1
         Top             =   4080
         Width           =   1095
      End
      Begin VB.Label Label16 
         Caption         =   "上次运行时间:"
         Height          =   255
         Left            =   480
         TabIndex        =   20
         Top             =   3240
         Width           =   1455
      End
      Begin VB.Label Label13 
         Caption         =   "修改时间:"
         Height          =   255
         Left            =   480
         TabIndex        =   19
         Top             =   3480
         Width           =   1095
      End
      Begin VB.Label Label21 
         Caption         =   "MSDOS名字:"
         Height          =   255
         Left            =   480
         TabIndex        =   18
         Top             =   2400
         Width           =   1215
      End
      Begin VB.Label Label19 
         Caption         =   "路径:"
         Height          =   255
         Left            =   480
         TabIndex        =   17
         Top             =   2640
         Width           =   975
      End
      Begin VB.Label Label30 
         Caption         =   "类型:"
         Height          =   255
         Left            =   480
         TabIndex        =   16
         Top             =   1200
         Width           =   615
      End
      Begin VB.Label Label26 
         Caption         =   "位置:"
         Height          =   375
         Left            =   480
         TabIndex        =   15
         Top             =   1680
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "属性:"
         Height          =   255
         Left            =   480
         TabIndex        =   14
         Top             =   4080
         Width           =   615
      End
      Begin VB.Line Line6 
         X1              =   360
         X2              =   4200
         Y1              =   3840
         Y2              =   3840
      End
      Begin VB.Label lblmodifyfl 
         Caption         =   "Label23"
         Height          =   255
         Left            =   1680
         TabIndex        =   13
         Top             =   3480
         Width           =   2175
      End
      Begin VB.Label lbllastfl 
         Caption         =   "Label22"
         Height          =   255
         Left            =   1680
         TabIndex        =   12
         Top             =   3240
         Width           =   2295
      End
      Begin VB.Line Line7 
         X1              =   360
         X2              =   4200
         Y1              =   3000
         Y2              =   3000
      End
      Begin VB.Label lblshtpathfl 
         Caption         =   "Label17"
         Height          =   255
         Left            =   960
         TabIndex        =   11
         Top             =   2640
         Width           =   3255
      End
      Begin VB.Label lblshtnamefl 
         Caption         =   "Label16"
         Height          =   255
         Left            =   1440
         TabIndex        =   10
         Top             =   2400
         Width           =   1695
      End
      Begin VB.Line Line8 
         X1              =   360
         X2              =   4200
         Y1              =   2280
         Y2              =   2280
      End
      Begin VB.Label lblpathfl 
         Caption         =   "lblpathfldr"
         Height          =   495
         Left            =   1080
         TabIndex        =   9
         Top             =   1680
         Width           =   3135
      End
      Begin VB.Label lblsizefl 
         Caption         =   "lblsizefldr"
         Height          =   255
         Left            =   2880
         TabIndex        =   8
         Top             =   1200
         Width           =   1095
      End
      Begin VB.Label Label28 
         Caption         =   "大小:"
         Height          =   255
         Left            =   2400
         TabIndex        =   7
         Top             =   1200
         Width           =   735
      End
      Begin VB.Label lbltypefl 
         Caption         =   "lblTypefldr"
         Height          =   255
         Left            =   1080
         TabIndex        =   6
         Top             =   1200
         Width           =   1215
      End
      Begin VB.Line Line9 
         X1              =   360
         X2              =   2400
         Y1              =   960
         Y2              =   960
      End
      Begin VB.Label lblnamefl 
         Caption         =   "Label4"
         Height          =   255
         Left            =   1200
         TabIndex        =   5
         Top             =   480
         Width           =   1575
      End
      Begin VB.Image imgfl 
         Height          =   495
         Left            =   480
         Top             =   360
         Width           =   495
      End
   End
End
Attribute VB_Name = "AttrForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub cmbCancel_Click()
    Frame1(g_intWho).Visible = False
    Unload AttrForm

End Sub

Private Sub cmbOK_Click()
    Dim attr As Integer
    attr = fldr.Attributes
    Select Case g_intWho
    Case 0
        If drv.VolumeName <> txtVol.Text Then
            drv.VolumeName = txtVol.Text
            frmFile.tvwFile.Nodes(drv.path + "\").Text = drv.DriveLetter + "(" + drv.VolumeName + ")"
        End If
   ' Case 1
        '只读
    '    If (fldr.Attributes And ReadOnly) <> 0 Then
    '        If chkreadfldr.Value = 0 Then
    '            attr = attr - 1
    '            fldr.Attributes = attr
    '        End If
   '     Else
    '        If chkreadfldr.Value = 1 Then
    '            attr = attr + 1
    '            fldr.Attributes = attr
    '        End If
    '    End If
    '    '存档
    '    If (fldr.Attributes And Archive) <> 0 Then
    '        If chkarchivefldr.Value = 0 Then fldr.Attributes = fldr.Attributes - Archive
    '    Else
    '        If chkarchivefldr.Value = 1 Then fldr.Attributes = fldr.Attributes + Archive
    '    End If
    '    '系统
    '    If (fldr.Attributes And System) <> 0 Then
    '        If chksysfldr.Value = 0 Then fldr.Attributes = fldr.Attributes - System
    '    Else
    '        If chksysfldr.Value = 1 Then fldr.Attributes = fldr.Attributes + System
    '    End If
    '    '隐藏
    '    If (fldr.Attributes And Hidden) <> 0 Then
   '         If chkhidefldr.Value = 0 Then fldr.Attributes = fldr.Attributes - Hidden
   '     Else
     '       If chkhidefldr.Value = 1 Then fldr.Attributes = fldr.Attributes + Hidden
      '  End If
    Case 2 '文件
        '只读
        If (fl.Attributes And ReadOnly) <> 0 Then
            If chkreadfl.Value = 0 Then fl.Attributes = fl.Attributes - ReadOnly
        Else
            If chkreadfl.Value = 1 Then fl.Attributes = fl.Attributes + ReadOnly
        End If
        '存档
        If (fl.Attributes And Archive) <> 0 Then
            If chkarchivefl.Value = 0 Then fl.Attributes = fl.Attributes - Archive
        Else
            If chkarchivefl.Value = 1 Then fl.Attributes = fl.Attributes + Archive
        End If
        '系统
        If (fl.Attributes And System) <> 0 Then
            If chksysfl.Value = 0 Then fl.Attributes = fl.Attributes - System
        Else
            If chksysfl.Value = 1 Then fl.Attributes = fl.Attributes + System
        End If
        '隐藏
        If (fl.Attributes And Hidden) <> 0 Then
            If chkhidefl.Value = 0 Then fl.Attributes = fl.Attributes - Hidden
        Else
            If chkhidefl.Value = 1 Then fl.Attributes = fl.Attributes + Hidden
        End If
        
    End Select
    '显示其结果
    
    Frame1(g_intWho).Visible = False
    Unload AttrForm
End Sub

Private Sub Form_Load()
    Dim intimgindex As Integer
    Dim strdrv As String
    
    Frame1(g_intWho).Visible = True

    Select Case g_intWho
    Case 0
      '选择图片
        Select Case drv.DriveType
        Case CDRom
            intimgindex = 5
        Case RamDisk
            intimgindex = 4
        Case Removable
            intimgindex = 3
        Case Network
            intimgindex = 9
        Case Unknown
            intimgindex = 4
        Case Fixed
            intimgindex = 4
        End Select
       Set imgIcon.Picture = frmFile.Imglarge.ListImages(intimgindex).Picture
       '填写驱动器的各种信息
       lblNamedrv.Caption = drv.DriveLetter + ":\"
       txtVol.Text = drv.VolumeName
        Select Case drv.DriveType
        Case CDRom
            strdrv = "光驱"
        Case RamDisk
            strdrv = "RAM"
        Case Removable
            strdrv = "软驱"
        Case Network
            strdrv = "网络驱动器"
        Case Unknown
            strdrv = "未知"
        Case Fixed
            strdrv = "本地磁盘"
        End Select
       lblTypedrv.Caption = strdrv
       lblTotal.Caption = CStr(drv.TotalSize / 1024 / 1024) + "M"
       lblSpace.Caption = CStr(drv.FreeSpace / 1024 / 1024) + "M"
       lblUsed.Caption = CStr((drv.TotalSize - drv.AvailableSpace) / 1024 / 1024) + "M"
       lblFS.Caption = drv.FileSystem
       
    Case 1 '文件夹
      Set imgfldr.Picture = frmFile.Imglarge.ListImages(6).Picture
      lblnamefldr.Caption = fldr.Name
      lblpathfldr.Caption = fldr.path
      lblTypefldr.Caption = fldr.Type
      lblSizefldr.Caption = CStr(fldr.Size / 1024) + "K"
      lblfldr.Caption = lblfldr.Caption + CStr(fldr.SubFolders.Count) + "个"
      lblfile.Caption = lblfile.Caption + CStr(fldr.Files.Count) + "个"
      lblshtnamefldr.Caption = fldr.ShortName
      lblshtpathfldr.Caption = fldr.ShortPath
      'lblcreatefldr.Caption = CStr(fldr.DateCreated)
      lbllstfldr.Caption = CStr(fldr.DateLastAccessed)
      lblmodifyfldr.Caption = CStr(fldr.DateLastModified)
      
      If (fldr.Attributes And ReadOnly) <> 0 Then
        chkreadfldr.Value = 1
      End If
      If (fldr.Attributes And Hidden) <> 0 Then
        chkhidefldr.Value = 1
      End If
      If (fldr.Attributes And System) <> 0 Then
        chksysfldr.Value = 1
      End If
      If (fldr.Attributes And Archive) <> 0 Then
        chkarchivefldr.Value = 1
      End If
      
      chksysfldr.Enabled = False
 
    Case 2
      Set imgfl.Picture = frmFile.Imglarge.ListImages(12).Picture
      lblnamefl.Caption = fl.Name
      lblpathfl.Caption = fl.path
      lbltypefl.Caption = fl.Type
      lblsizefl.Caption = CStr(fl.Size / 1024) + "K"
      lblshtnamefl.Caption = fl.ShortName
      lblshtpathfl.Caption = fl.ShortPath
      'lblcreatefl.Caption = CStr(fl.DateCreated)
      lbllastfl.Caption = CStr(fl.DateLastAccessed)
      lblmodifyfl.Caption = CStr(fl.DateLastModified)
      
      If (fl.Attributes And ReadOnly) <> 0 Then
        chkreadfl.Value = 1
      End If
      If (fl.Attributes And Hidden) <> 0 Then
        chkhidefl.Value = 1
      End If
      If (fl.Attributes And System) <> 0 Then
        chksysfl.Value = 1
      End If
      If (fl.Attributes And Archive) <> 0 Then
        chkarchivefl.Value = 1
      End If
      
      chksysfl.Enabled = False
     
    
    End Select
    
End Sub

⌨️ 快捷键说明

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