标题:输入超出文件尾,怎么办?
只看楼主
fds788
Rank: 2
等 级:论坛游民
帖 子:8
专家分:15
注 册:2013-10-22
结帖率:100%
 问题点数:0 回复次数:0 
输入超出文件尾,怎么办?
程序代码:
Private Sub Form_Load()


 Dim X, Y
Open "c:\at.txt" For Input As #1

Open "c:\music.txt" For Input As #2

Do While Not EOF(1)
     Input #1, X
     Input #2, Y
     If Mid(X, 1, 2) = "ht" Then
     List1.AddItem (List1.ListCount + 1) & "." & Y
    Call wmp1.currentPlaylist.insertItem(wmp1.currentPlaylist.Count, wmp1.newMedia(X))
    ElseIf PathFileExists(X) = 1 Then
    List1.AddItem (List1.ListCount + 1) & "." & Y
    Call wmp1.currentPlaylist.insertItem(wmp1.currentPlaylist.Count, wmp1.newMedia(X))
    End If
Loop
Close #1
Close #2
end sub
2013-11-01 15:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-422890-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.744927 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved