[RESOLVED] Problem with writing a string to a file several times
Hi I'm having issues regarding writing several strings to a txt file.
The sub starts like this
Code:
Dim ss As New FileStream("Settings.conf", FileMode.OpenOrCreate, FileAccess.ReadWrite)
Dim s As New StreamWriter(ss)
Writing and close
Code:
s.BaseStream.Seek(0, SeekOrigin.Begin)
s.WriteLine(info.StoreName)
s.WriteLine(info.aName)
s.WriteLine(info.aID)
s.Close()
But when i click the button several times, it says that the file is being used by another process. My guess is that s wasn't closed?
Edit: Also, how do I enable a button after clicking another button?