Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not File.Exists("settings.xox") Then
MessageBox.Show("1")
File.Create(Directory.GetCurrentDirectory & "settings.xox")
Dim CreateSettings As New StreamWriter("settings.xox")
CreateSettings.WriteLine("10")
CreateSettings.WriteLine("10")
MessageBox.Show("2")
End If
Dim OpenSettings As New StreamReader("settings.xox")
MessageBox.Show("3")
End Sub
I added these Messageboxes for Debug reasons.
If the file (settings.xox) doesnt exist, it is created, but empty. I get to see the Messageboxes 1 and 2, 3 doesn't appear.
If the file exists, none of the messageboxes show.
This doesn't make sense to me at all, can you guys help me please.