Save/GetSetting(eng)
I får denne på engelsk, da jeg ikke gider oversætte det igen:Ok, I'm in need for some help with Save/GetSetting, and I don't get it. I at least 'think' I'm doing it right! I have two OptionButtons(compView1/compView2), which represent true/false of a setting.
I'm saving those like this:
[quote] Private Sub Button28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button28.Click
ErrorProvider1.SetError(Button28, "Settings applied and saved")
If CompView1.Checked = True Then
SaveSetting("MyApp", "CompView1", "Checked", "True")
ElseIf CompView1.Checked = False Then
SaveSetting("MyApp", "CompView1", "Checked", "False")
End If
If CompView2.Checked = True Then
SaveSetting("MyApp", "CompView2", "Checked", "True")
ElseIf CompView2.Checked = False Then
SaveSetting("MyApp", "CompView2", "Checked", "False")
End If
End Sub[/quote]
And I'm grabbing them again with this code:
[quote] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim GetCompView2(,) As String
GetCompView2 = GetAllSettings("MyApp", "CompView2")
Dim GetCompView1(,) As String
GetCompView2 = GetAllSettings("MyApp", "CompView1")
Welcome.BringToFront()
treComponents.TopNode.Expand()
End Sub[/quote]
As I can see they ARE being saved in the registry! What do I change?
