Save listitems to the register

Hi

I have a ListView containing 10 items; I want these items to be saved in the register. And if to two (or more items) accidentally has the same name the items should be saved as the same key.

(I use VB6)

/ChristianJ
ChristianJAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcriderCommented:
VB has a built-in way of getting and saving information using the Registry.

The methods are GetSetting, GetAllSettings, and SaveSetting.

formats are:

   GetSetting(appname, section, key[, default])

   GetAllSettings(appname, section)

   SaveSetting appname, section, key, setting


Hope this helps!


Cheers!


0
mcriderCommented:
By the way, there are examples of these methods in the VB Help Pages...



Cheers!
0
ChristianJAuthor Commented:
I am already aware of the GetSetting, GetAllSettings, and SaveSetting methods. I am not sure if you understood what I wanted. I try to explain again:

I have a ListView with 10 items. When pressing a button all these items should be saved into the registry. When using what you suggested just one item was saved into the registry. What I want is the items to appear like this and if two items accidentally has the same name just one of them should be saved.  

[Standard]
FavPath1            "Listitem1"
FavPath2            "Listitem2"
FavPath3            "Listitem3"
FavPath4            "Listitem4"
FavPath5            "Listitem5"
FavPath6            "Listitem6"
....            
0
mcriderCommented:
You need to do a SaveSetting for each item... Not just one.


Cheers!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mcriderCommented:
Thanks for the points! Glad I could help!


Cheers!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.