[VB] Save to file

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.
 

Samael88

Evil always finds a way
Reaction score
181
I don't know any visual basic, but if you posted the code for how you are doing it now, then perhaps I can assist you anyway:)
 

Vestras

Retired
Reaction score
248
Code:
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!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top