7,763
社区成员
发帖
与我相关
我的任务
分享
dim Lines() as string
dim mCurrent as long
sub Form_load
open fName for binary as #1
dim L as long
dim D() as byte
L=lof(1)
if L=0 then
msgbox "文件长度为0"
exit sub
end if
resim D(L-1)
get 1,,D
dim s as string
s=strconv(d,vbunicode)
lines=split(s,vbcrlf)
end sub
sub Timer1_Timer
dim D() as string
d=split(d(i)," ")
'd(0),d(1),d(2) 既为每行的三个数,你自己决定怎么使用这三个数吧
end sub
sub Timer1_Timer
dim D() as string
d=split(d(mCurrent)," ")
mCurrent=mCurrent+1
'd(0),d(1),d(2) 既为每行的三个数,你自己决定怎么使用这三个数吧
end sub
dim Lines() as string
dim mCurrent as long
sub Form_load
open fName for binary as #1
dim L as long
dim D() as byte
L=lof(1)
resim D(L-1)
get 1,,D
dim s as string
s=strconv(d,vbunicode)
lines=split(s,vbcrlf)
end sub
sub Timer1_Timer
dim D() as string
d=split(d(i)," ")
'd(0),d(1),d(2) 既为每行的三个数,你自己决定怎么使用这三个数吧
end sub
Dim A, S As String
Dim FreeNum As Integer
FreeNum = FreeFile
'Freenum表示一个空闲的文件号
Open "c:\G.txt" For Input As #FreeNum
'这步是打开“date.txt”,for input表示以输入方式(即读取文件)打开。如果要写入文件则应该用output或append。
Do Until EOF(FreeNum) '循环,直到文件结尾。Eof函数用来判断文件是否读完
Line Input #FreeNum, A
S = S + vbNewLine + A 'S用来保存整个文件
If z>t And Not EOF(FreeNum) Then
Text1.Text = A
Line Input #FreeNum, A '读取下一行的内容
Exit Do '退出循环
End If
Loop
Close FreeNum