Hello everyone, I'm trying to develop a program which read from a text file data.
Then display one data line per time with 2 sec delay in an lcd which is connected throught the internet.
I get a run time error'424' here myFile = File.ReadAllLines("c:\account.txt") '//load file.
Dim LineNumber As Integer
Dim myFile() As String
Private Sub Form_Load()
tcpComm1.NodeIP = "xxx.xxx.xxx.xxx"
tcpComm1.NodePort = "xxxx"
tcpComm1.Link
myFile = File.ReadAllLines("c:\account.txt") '//load file
LineNumber = 0 'Initialize Line Number
Timer1.Interval = 2000 '//2 sec delay
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
If LineNumber < myFile.length Then '//if not the end of file
tcpComm1.DataOutput (myFile(LineNumber)) ' //display line
LineNumber = LineNumber + 1
Else
LineNumber = 0 '//Reset lines back to first
End If
End Sub
Thanks
Giannoui