Try the split function.
I've set up everything, and on the Settings tab in the Project Properties I've set up some items, and I want to save the items in my ListBox so that on the next load it loads them up. I'm doing this through the Settings on Project Properties. However it denies it, saying:Any help on this???Value of type 'System.Windows.Forms.ListBox.ObjectCollection' cannot be converted to 'System.Collections.Specialized.StringCollection'.
Try the split function.
[IMG]https://************.com/sig/020/ajvpot.jpg[/IMG]
[img]https://************.com/sig/020/Bommer.jpg[/img]
^^LEGIT ACCOUNTS ^^
[IMG]https://************.com/sig/020/banned2m0rr0.jpg[/IMG]
^^HACKER ACCOUNT^^
NextGen1 (03-16-2010)
there are enough tutorials about this. use the searchfunction.
Rules: Display Error
Display Code
Display Code line before
Display Code Line after
Display the code you are using (preferably in it's entirety)
That is going to be the best way we can help you
MJLover (03-18-2010)
I do not think it is possible to save a listbox contents to my.settings i posted a TUT on saving listbox items to a text file, you can look it up under nextgens tut list
/pwnt the minionCode:my.settings.blablabla.clear() for each item in listbox1 my.settings.blablabla.add(item) next *note, "blablabla" should be changed to the name of the setting.
also, make sure you add at least one item and then delete it in the setting, or else it will not work.
works in the web browser im building, and im 99% finished, just need to add a msgbox.
EDIT: Finished it...
lmao thats how badly i must suck... i always tried to save it as a string (never quite worked...)
but hey, im learning
ha ha , You wish,/pwnt the minion
His question was easy to understand and straight forward. My concern is getting those into the habit of using the rules, the specific rules I listed above are there to better help the one asking the question, it will allow those answering the questions to better help them, and even faster.
The ListBox item contents are stored in ListBox.ObjectCollection, whenever you use the Items.Add method, you need to use ToString method or CType to convert the connection object to string.
I don't know if your method would work, but if you say it does, i'm sure it will.
the OP will let us know.
Who said that? ...