pexam12_2.frm

来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 78 行

FRM
78
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.FileListBox File1 
      Height          =   1530
      Left            =   2400
      TabIndex        =   4
      Top             =   1320
      Width           =   1695
   End
   Begin VB.DirListBox Dir1 
      Height          =   1560
      Left            =   240
      TabIndex        =   3
      Top             =   1320
      Width           =   1935
   End
   Begin VB.DriveListBox Drive1 
      Height          =   300
      Left            =   240
      TabIndex        =   2
      Top             =   960
      Width           =   1935
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   480
      Width           =   3855
   End
   Begin VB.Label Label1 
      Caption         =   "文件名:"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
  Text1.Text = ""
  Drive1.Drive = "c:\"                ' 初始化驱动器列表框
Rem 设置文件属性--如显示只读文件(实验时去掉注释)
  ' File1.ReadOnly = True
  ' File1.Archive = False
  ' File1.System = False
  ' File1.Normal = False
  ' File1.Hidden = False
  Rem 设置文件过滤条件(实验时可去掉注释)
  ' File1.Pattern = "*.txt;*.exe"
End Sub
Private Sub Drive1_Change()
  ' 使驱动器列表框和目录列表框同步
  Dir1.Path = Drive1.Drive
End Sub
Private Sub Dir1_Change()
  ' 使目录列表框和文件列表框同步
  File1.Path = Dir1.Path
End Sub
Private Sub File1_Click()
  Text1.Text = File1.FileName         ' 在文本框中显示文件名
End Sub

⌨️ 快捷键说明

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