Hello,
i'm trying to save checkbox.checkstate like in this code
Code:
Dim sound As New System.IO.StreamWriter("C:\Alarm\" + "Sound.txt")
sound.WriteLine(CheckBox1.CheckState)
sound.Close()
Dim shutdown As New System.IO.StreamWriter("C:\Alarm\" + "Shutdown.txt")
shutdown.WriteLine(CheckBox2.CheckState)
shutdown.Close()
and it works fine, just that when i read it it will just read checkbox1 not checkbox2.
Read code
Code:
Dim soundread As New System.IO.StreamReader("C:\Alarm\" + "Sound.txt")
Dim sr As String
sr = soundread.ReadLine
If sr = "1" Then
CheckBox1.CheckState = CheckState.Checked
If sr = "0" Then
CheckBox1.CheckState = CheckState.Unchecked
soundread.Close()
Dim shutdownread As New System.IO.StreamReader("C:\Alarm\" + "Shutdown.txt")
Dim sdr As String
sdr = soundread.ReadLine
If sdr = "1" Then
CheckBox2.CheckState = CheckState.Checked
If sdr = "0" Then
CheckBox2.CheckState = CheckState.Unchecked
shutdownread.Close()
And btw, try to explain so noobs like me understand.
+2 +Rep if u help me with this :wave: