作者a9 (a9)
看板Visual_Basic
标题Re: [VB6 ] 读取txt
时间Sat Jun 28 13:43:26 2008
※ 引述《CuckooBoy (书仔)》之铭言:
: 照书demo打,执行说.....a$ 找不到方法或成员??
: 哪边有错呢?
: 高手可以推一把吗?>"<
: Private Sub Form_Load()
: Open App.Path & "\Backup.ini" For Output As #1
: Line Input #1, a$
: Title.txt = a$
: Close #1
: End Sub
Dim f as Integer,sLine As String
f=FreeFile '取得一个可用的档案代码
Open App.Path & \"Backup.ini" For Input As #f '用Input方式开档
While Not EOF(f) '如果还没到档尾
Line Input #f,sLine '读取一行
'做你要做的事
Wend
Close#f '关档
如果只要读一行
If Not EOF(f) Then Line Input #f,sLine
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 221.169.187.111