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

📄 file_mod.bas

📁 一个图书馆的VB做的mis系统
💻 BAS
字号:
Attribute VB_Name = "file_mod"
Public ame(20) As String
Public i As Integer



Public Function file_input()



Dim read As String


i = -1


On Error GoTo err1



Open "name.txt" For Input As #1


While Not EOF(1)


 Line Input #1, read
   
 i = i + 1

 login_form.a_name.List(i) = read
 
 ame(i) = read
 
 
 
Wend


 login_form.a_name.Text = read
 
 
Close #1


Exit Function



err1:

Open "name.txt" For Output As #1


  'Print #1 = Empty, login_form.a_name.Text

 

Close #1




End Function








Public Function file_output()



Dim num As Integer


Dim p As Integer

num = 0



Open "name.txt" For Append As #1



If i = -1 Then
  
  
i = 0



End If




For p = 0 To i



   If ame(p) <> login_form.a_name.Text Then

       num = num + 1
 
   End If

Next p


   num = num - i

   If num = 1 Then


Print #1, login_form.a_name.Text


 
End If


Close #1



End Function

⌨️ 快捷键说明

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