Orr K.
Irvine, CA
Nov 10, 2015
21
Posts
Re: File I/0 Functions
Hi.
First of all you need to make sure you have Read and Write access to the file. In this case I am creating the file from scratch every time.
lFileMode=aFileModeCreateNew or aFileModeRead or aFileModeWrite
textFile=FileOpen(GetDir(aGetDirCurrent)+"\\FileRead_"+str(Tick())+".txt",lFileMode)
Second, when reading from the file you need to select the beginning location of the file if you want to read all the files contents.
FileSeek(textFile,0,aFileOriginBegin)
lBytes=FileRead(textFile,sText)
tbTextFileView.Text=sText
I attached an example.
Regards,
Orr
File Attachment:
IOForums.zip