JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
I found that there was the Settings.Properties collection as well as the Settings.PropertyValues collection, and hopefully i'm not doing extra work here, but i'm creating both, and then assigning a value to the Settings(PropName).
Defaultly, in my "static" settings (through the IDE designer window and such) I have 9 settings/properties, and at run time when I'm processing, the Settings.Properties.Count doeos indeed equal 9.
Now, in the process of my application I generate some "saved" control properties myself, and actively "add" them to the Settings:
This seems to work fine, and after the repetitive code (cycling through a collection) is finished, the Setting.Properties.Count does indeed equal 79, for the 70 new properties added.
I not only execute a My.Settings.Save() when the application exits, but I know I also have the SaveMySettingsOnExit set to true, but the next time i load up the app, my settings.properties.count is back to 9.
Any Ideas?
Thanks
Defaultly, in my "static" settings (through the IDE designer window and such) I have 9 settings/properties, and at run time when I'm processing, the Settings.Properties.Count doeos indeed equal 9.
Now, in the process of my application I generate some "saved" control properties myself, and actively "add" them to the Settings:
VB.NET:
For Each prop As String In Me.Keys
Try
name = Layout & "." & _control.Name & "." & prop
Try
p = Settings.Properties(name)
Catch
p = Nothing
End Try
If p Is Nothing Then
p = New Configuration.SettingsProperty(name)
p.PropertyType = Me(prop).GetType
Settings.Properties.Add(p)
Settings.PropertyValues.Add(New Configuration.SettingsPropertyValue(p))
End If
Settings(name) = Me(prop)
Catch ex As Exception
Exit Sub
End Try
Next
This seems to work fine, and after the repetitive code (cycling through a collection) is finished, the Setting.Properties.Count does indeed equal 79, for the 70 new properties added.
I not only execute a My.Settings.Save() when the application exits, but I know I also have the SaveMySettingsOnExit set to true, but the next time i load up the app, my settings.properties.count is back to 9.
Any Ideas?
Thanks