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

📄 frmfso2.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmFSO2 
   Caption         =   "Fig. 14.11: File FSO"
   ClientHeight    =   2985
   ClientLeft      =   2865
   ClientTop       =   1920
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2985
   ScaleWidth      =   4680
   Begin VB.TextBox txtBox 
      Height          =   1560
      Left            =   120
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   2
      Top             =   1290
      Width           =   4350
   End
   Begin VB.FileListBox filFile 
      Height          =   1065
      Left            =   2385
      TabIndex        =   1
      Top             =   120
      Width           =   2085
   End
   Begin VB.DirListBox dirDirectory 
      Height          =   990
      Left            =   105
      TabIndex        =   0
      Top             =   105
      Width           =   2160
   End
End
Attribute VB_Name = "frmFSO2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 14.11
' Demonstrating File FSO
Option Explicit                   ' General declaration
Dim mFso As New FileSystemObject  ' General declaration

Private Sub dirDirectory_Change()
   
   ' Update filFile's Path when dirDirectory changes
   filFile.Path = dirDirectory.Path
End Sub

Private Sub filFile_Click()
   Dim theFile As File
   
   txtBox.Text = ""    ' Clear TextBox
   
   ' Determine which file name was selected and return
   ' its File object.
   Set theFile = mFso.GetFile(filFile.Path & "\" & _
                 filFile.List(filFile.ListIndex))
                 
   ' Display File information in PictureBox
   txtBox.Text = "Created: " & theFile.DateCreated & _
                 vbNewLine & _
                 "Last Accessed: " & theFile.DateLastAccessed & _
                 vbNewLine & "Last Modified: " & _
                 theFile.DateLastModified & vbNewLine & _
                 "Drive: " & theFile.Drive & vbNewLine & _
                 "Size: " & theFile.Size & " bytes" & _
                 vbNewLine & _
                 "Path: " & theFile.Path & vbNewLine & _
                 "Short Name: " & theFile.ShortName
End Sub

⌨️ 快捷键说明

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