Hello, i tried to find some codes in here. (By search) But i haven't still found solution.
TXT file aka config:
Well.. TXT file path is in this variable.
Dim DATA_PATH As String = "C:/LAUNCHER.txt"
When Form1_Load is being executed, then this code will also executed...
How i can read txt file and store into variables?
Dim SAMP_PATH As String = "C:...."
Dim PATH_FOUND As Integer = ...
Dim PLAYER_NAME As String = "..."
But also how i can overwrite some value in TXT file if user has changed some setting?
TXT file aka config:
Code:
SAMP_PATH=C:/Program Files/Extra/Nothing/samp.exe
PATH_FOUND=1
PLAYER_NAME=My_First_Last_Name
Dim DATA_PATH As String = "C:/LAUNCHER.txt"
When Form1_Load is being executed, then this code will also executed...
VB.NET Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MsgBox("EXISTS") 'Read values in txt file..? Else Dim DATA_WRITE As New System.IO.StreamWriter(DATA_PATH) DATA_WRITE.WriteLine("SAMP_PATH=") DATA_WRITE.WriteLine("PATH_FOUND=0") DATA_WRITE.WriteLine("PLAYER_NAME=") DATA_WRITE.Close() End If
How i can read txt file and store into variables?
Dim SAMP_PATH As String = "C:...."
Dim PATH_FOUND As Integer = ...
Dim PLAYER_NAME As String = "..."
But also how i can overwrite some value in TXT file if user has changed some setting?