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

📄 folder.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmFolder 
   Caption         =   "Fig. 14.13: Folder FSO"
   ClientHeight    =   2880
   ClientLeft      =   2640
   ClientTop       =   1920
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2880
   ScaleWidth      =   4680
   Begin VB.TextBox txtDisplay 
      Height          =   1320
      Left            =   105
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   1
      Top             =   1455
      Width           =   4350
   End
   Begin VB.DirListBox dirBox 
      Height          =   1215
      Left            =   135
      TabIndex        =   0
      Top             =   90
      Width           =   4305
   End
End
Attribute VB_Name = "frmFolder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 14.13
' Demonstrating the Folder FSO
Option Explicit                    ' General declaration
Dim mFso As New FileSystemObject   ' General declaration

Private Sub dirBox_Click()
   Dim f As Folder
   
   ' Get a Folder to the selected item
   Set f = mFso.GetFolder(dirBox.List(dirBox.ListIndex))
   
   txtDisplay.Text = ""      ' Clear TextBox
   
   ' Test for the root folder
   If f.IsRootFolder = False Then
      txtDisplay.Text = "Root folder: " & f.IsRootFolder _
                        & vbNewLine & _
                        "Parent Folder: " & f.ParentFolder & _
                        vbNewLine & "Size: " & f.Size
   Else
      txtDisplay.Text = "Root folder: " & f.IsRootFolder
   End If
   
   txtDisplay.Text = txtDisplay.Text & vbNewLine & "Type: " & _
                     f.Type & vbNewLine & _
                     "Short Path: " & f.ShortPath & _
                     vbNewLine & "Path: " & f.Path & _
                     vbNewLine & "Short Name: " & f.ShortName
End Sub

⌨️ 快捷键说明

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