请高手帮忙改一下程序!
这是一个带连接的滚动栏.我想让他读文件下1.txt 的内容,让后实现自己滚动,谢谢了,,在线等!!
滚动的超级链接.rar
(4.66 KB)
Option Explicit Private Sub Form_Load() Label1 = TextGetByFile(App.Path & "\1.txt") 超级滚动链接1.内容 = Label1 超级滚动链接1.间隔 = 9000 超级滚动链接1.滚动 = True End Sub Public Function TextGetByFile(ByVal pFileName As String) As String '从文件获得多行文本。 Dim tOutText As String Dim tFileNumber As Integer Dim tBytes() As Byte tFileNumber = FreeFile Open pFileName For Binary As #tFileNumber If CBool(LOF(tFileNumber)) Then ReDim tBytes(LOF(tFileNumber) - 1) Get tFileNumber, 1, tBytes() tOutText = StrConv(tBytes, vbUnicode) Else MsgBox "警告:文件" & pFileName & "是空的!", vbOKOnly, "文件无内容" End If Close #tFileNumber TextGetByFile = tOutText End Function