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

📄 文件选择应用程序.frm

📁 VB源码,是初学者的福因.让你很快掌握VB编程
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "文件选择应用程序"
   ClientHeight    =   3375
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   4185
   LinkTopic       =   "Form1"
   ScaleHeight     =   3375
   ScaleWidth      =   4185
   StartUpPosition =   3  '窗口缺省
   Begin VB.FileListBox File1 
      Height          =   2070
      Left            =   2160
      TabIndex        =   2
      Top             =   240
      Width           =   1695
   End
   Begin VB.DirListBox Dir1 
      Height          =   1770
      Left            =   360
      TabIndex        =   1
      Top             =   600
      Width           =   1695
   End
   Begin VB.DriveListBox Drive1 
      Height          =   300
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   1695
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   2640
      Width           =   1695
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Label2"
      Height          =   180
      Left            =   240
      TabIndex        =   3
      Top             =   3000
      Width           =   1740
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub File1_Click()
 Label2.Caption = File1.Path & "\" & File1.FileName
End Sub

Private Sub File1_DblClick()
  Shell File1.Path & "\" & File1.FileName, vbNormalNoFocus
End Sub

Private Sub Form_Load()
  Label1.Caption = "当前文件路径为:"
  Label2.Caption = ""
  Drive1.Drive = "g:\"
  Dir1.Path = "g:\systool"
End Sub

Private Sub Drive1_Change()
  ChDrive Drive1.Drive
  Dir1.Path = Drive1.Drive
End Sub

Private Sub Dir1_Change()
  ChDrive Dir1.Path
  File1.Path = Dir1.Path
  Label2.Caption = File1.Path & "\" & File1.FileName
End Sub

⌨️ 快捷键说明

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