Question Need Help With: Storing Multiple Strings in My.Settings

ProtekNickz

Well-known member
Joined
Oct 22, 2009
Messages
117
Location
UK
Programming Experience
1-3
First of all Hi :), My problem is storing multiple string in the my settings to clarify more on this ill try explaine as best as i can,

'I set my value like so
Dim strSettings As New My.MySettings

'On the form load i use this
        Dim itemz As New ListViewItem
        itemz.Text = strSettings.User
        itemz.SubItems.Add(strSettings.Password)
        itemz.SubItems.Add(strSettings.webService)
        lstDetails.Items.Add(itemz)

'Under the the Button "ADD" im using
        Dim itemz As New ListViewItem
        itemz.Text = txtUser.Text
        itemz.SubItems.Add(EncryptData(txtPass.Text))
        itemz.SubItems.Add(cboService.Text)
        lstDetails.Items.Add(itemz)
        strSettings.User = txtUser.Text
        strSettings.Password = EncryptData(txtPass.Text)
        strSettings.webService = cboService.Text
        strSettings.Save()

i can add as many to the list box, and even load them all when i figure out how to store the values to the My.Settings as Multiple


This is the first time i've used the Forms Settings, and was woundering would it be better to do

'Create this Value as an Array like so or is their a better way?
Dim strSettings() As New My.MySettings


if i have not been clear on this please say so, cheers for any help offered :)
 
Top Bottom