Results 1 to 13 of 13
  1. #1
    Samueldo's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Meh
    Posts
    1,023
    Reputation
    29
    Thanks
    348
    My Mood
    Inspired

    [Help] VB.NET 2008 - Saving ListBox Items in Settings

    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:
    Value of type 'System.Windows.Forms.ListBox.ObjectCollection' cannot be converted to 'System.Collections.Specialized.StringCollection'.
    Any help on this???
    Quote Originally Posted by Grim View Post
    glad to be an inspiration
    Minions rule. /endof

    InjectPlz Refresh - download v1.0 now!

  2. #2
    ajvpot's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    139
    Reputation
    10
    Thanks
    39
    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^^

  3. #3
    LegendaryAbbo's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    5,243
    Reputation
    23
    Thanks
    546
    My Mood
    Relaxed
    Moved to VB section.

  4. The Following User Says Thank You to LegendaryAbbo For This Useful Post:

    NextGen1 (03-16-2010)

  5. #4
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    there are enough tutorials about this. use the searchfunction.



  6. #5
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    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


     


     


     



    The Most complete application MPGH will ever offer - 68%




  7. The Following User Says Thank You to NextGen1 For This Useful Post:

    MJLover (03-18-2010)

  8. #6
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    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

  9. #7
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    Code:
    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.
    /pwnt the minion

    also, make sure you add at least one item and then delete it in the setting, or else it will not work.
    Last edited by mnpeepno2; 03-16-2010 at 07:43 PM.


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  10. #8
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Quote Originally Posted by mnpeepno2 View Post
    Code:
    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.
    /pwnt the minion

    also, make sure you add at least one item and then delete it in the setting, or else it will not work.
    Have you tested that method? I don't think that that method works

  11. #9
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    works in the web browser im building, and im 99% finished, just need to add a msgbox.

    EDIT: Finished it...
    Last edited by mnpeepno2; 03-16-2010 at 08:33 PM.


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  12. #10
    jaake's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Up your ass
    Posts
    55
    Reputation
    13
    Thanks
    23
    My Mood
    Tired
    lmao thats how badly i must suck... i always tried to save it as a string (never quite worked...)

    but hey, im learning

  13. #11
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    /pwnt the minion
    ha ha , You wish,

    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.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  14. #12
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    w8, so u want me to release the web browser?


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  15. #13
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Who said that? ...


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. [Help]Add Listbox Items per line[Solved]
    By nathanael890 in forum Visual Basic Programming
    Replies: 12
    Last Post: 02-12-2011, 01:36 AM
  2. [Help]VB.NET (2008)
    By CptnDutch in forum Visual Basic Programming
    Replies: 17
    Last Post: 12-07-2010, 10:36 AM
  3. [REQUEST]Save ListBox Items
    By Prfction in forum Visual Basic Programming
    Replies: 2
    Last Post: 10-06-2010, 10:11 PM
  4. [Help]ListBox.Item.Selected[Solved]
    By hopefordope in forum Visual Basic Programming
    Replies: 6
    Last Post: 04-21-2010, 08:32 AM
  5. My Crosshair Hack made in VB.NET ( 2008)
    By startdriveturn in forum Visual Basic Programming
    Replies: 15
    Last Post: 09-06-2009, 12:52 PM