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

📄 form1.frm

📁 VB高级程序设计高手篇
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   Caption         =   "Form1"
   ClientHeight    =   2295
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3495
   LinkTopic       =   "Form1"
   ScaleHeight     =   2295
   ScaleWidth      =   3495
   StartUpPosition =   3  '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8

Dim fso As Object
Dim fso_file As Object

Private Sub Form_Load()
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fso_file = fso.OpenTextFile(App.Path + "\test.txt", ForReading, True)
    Do While Not fso_file.AtEndOfStream
        Me.Print fso_file.ReadLine
    Loop
    fso_file.Close
End Sub

Private Sub Form_Terminate()
    Set fso_file = fso.OpenTextFile(App.Path + "\test.txt", ForAppending, True)
    fso_file.WriteLine ("new line")
    fso_file.Close
    Set fso_file = Nothing
    Set fso = Nothing
End Sub

⌨️ 快捷键说明

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