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

📄 form2.frm

📁 *.TXT文件处理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "Form2"
   ClientHeight    =   5055
   ClientLeft      =   5175
   ClientTop       =   4740
   ClientWidth     =   6840
   LinkTopic       =   "Form2"
   ScaleHeight     =   5055
   ScaleWidth      =   6840
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   375
      Left            =   5040
      TabIndex        =   7
      Top             =   960
      Width           =   1575
   End
   Begin VB.FileListBox File1 
      Height          =   1350
      Left            =   240
      MultiSelect     =   1  'Simple
      TabIndex        =   3
      Top             =   3600
      Width           =   6375
   End
   Begin VB.DirListBox Dir1 
      Height          =   1560
      Left            =   240
      TabIndex        =   2
      Top             =   1680
      Width           =   6375
   End
   Begin VB.DriveListBox Drive1 
      Height          =   300
      Left            =   240
      TabIndex        =   1
      Top             =   960
      Width           =   4455
   End
   Begin VB.TextBox Text1 
      Height          =   855
      Left            =   240
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   0
      Width           =   6375
   End
   Begin VB.Label Label3 
      Caption         =   "驱动器:"
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "文件名称:"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   3360
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "文件夹:"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   1440
      Width           =   975
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub Command1_Click()
On Error Resume Next
If YuanFILEname = True Then
   Form1.Text4.Text = Form2.Text1.Text
Else
  If mubiaoFILEname = True Then
    Form1.Text3.Text = Form2.Text1.Text
  Else
  End If
End If
Unload Me
End Sub

Private Sub Drive1_Change()
On Error Resume Next
Dir1.Path = Drive1.Drive
End Sub

Private Sub File1_PathChange()
On Error Resume Next
  Text1.Text = File1.Path & "\" & File1.FileName     'text1 中显示路径和文件。
End Sub

Private Sub Dir1_Change()
On Error Resume Next
   File1.Path = Dir1.Path            ' 设置文件路径。
End Sub

Private Sub File1_Click()
On Error Resume Next
  Text1.Text = File1.Path & "\" & File1.FileName
End Sub

Private Sub Form_Load()
  On Error Resume Next
  Text1.Text = File1.Path & "\" & File1.FileName  '在 text1 中显示路径和文件。"
End Sub

⌨️ 快捷键说明

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