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

📄 form1.frm

📁 用VB编写的一个能够存贮的小东西 比方说你从C盘取出一个东西 然后存贮到D盘
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4620
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6495
   LinkTopic       =   "Form1"
   ScaleHeight     =   4620
   ScaleWidth      =   6495
   StartUpPosition =   3  '窗口缺省
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   3000
      Top             =   1320
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "按钮2"
      Height          =   615
      Left            =   3720
      TabIndex        =   4
      Top             =   1560
      Width           =   2295
   End
   Begin VB.CommandButton Command1 
      Caption         =   "按钮1"
      Height          =   615
      Left            =   3720
      TabIndex        =   3
      Top             =   360
      Width           =   2295
   End
   Begin VB.FileListBox File1 
      Height          =   1530
      Left            =   360
      TabIndex        =   2
      Top             =   2160
      Width           =   2655
   End
   Begin VB.DirListBox Dir1 
      Height          =   1350
      Left            =   360
      TabIndex        =   1
      Top             =   720
      Width           =   2655
   End
   Begin VB.DriveListBox Drive1 
      Height          =   300
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   2655
   End
   Begin VB.Label Label1 
      Caption         =   "题目说明:按钮1打开对话框选取文件2,通过左边的文件控件选取文件1的位置,按钮2的功能是将文件2的内容读出写入到文件1,并将文件2删除"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   3240
      TabIndex        =   5
      Top             =   2400
      Width           =   3015
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    CommonDialog1.ShowOpen
End Sub

Private Sub Command2_Click()
    Dim strpath As String, s As String
    
    If CommonDialog1.FileName = "" Then
        MsgBox "请先选择文件2"
        Exit Sub
    End If
    
    If Right(File1.Path, 1) = "\" Then
        strpath = File1.Path & File1.FileName
    Else
        strpath = File1.Path & "\" & File1.FileName
    End If
    
    Open strpath For Append As #1
    Open CommonDialog1.FileName For Input As #2
    Do While Not EOF(2)
        Line Input #2, s
        Print #1, s
    Loop
    Close
    Kill CommonDialog1.FileName
End Sub

Private Sub Dir1_Change()
    File1.Path = Dir1.Path
End Sub

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

⌨️ 快捷键说明

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