gameman
It's been a long, long time.
- Reaction score
- 95
How do you save a string to a text file WITHOUT a button or a dialogue? I want to update preferences file with out using any dialogue so that the saving would be as quiet as possible.
Imports System
Imports System.IO
'...
'In some Sub/Function
Dim fileWriter as StreamWriter = File.CreateText("path") 'The name doesn't really describe it very good, CreateText actually doesn't create a file, it opens it.
fileWriter.WriteLine("hehehe :)") 'Or whatever you wanna write :)
fileWriter.Close() 'Always remember to close a file, else the program will keep "using" it!