Results 1 to 9 of 9

Thread: How can you load and save contents of a listbox in vb.net?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2002
    Posts
    628

    How can you load and save contents of a listbox in vb.net?

    Anyone know?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Loop through all the items in the listbox then write them using streamWriter object .

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2002
    Posts
    628
    gaa?
    do u have any sample code =)?

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    It sounds easy . Hold on I will build a sample for you.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Here you go ...
    Attached Files Attached Files

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Little note , it creates new text file in the C: partition and read from there .

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    May 2002
    Posts
    628
    thank you very very much!

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

  9. #9
    Addicted Member theonetrueace's Avatar
    Join Date
    Jan 2002
    Location
    South Alabama
    Posts
    196
    i posted some code here that could easily be usedd for listbox....i used it with listview....i believe there is import....export....and multi-delete codes in there.....

    http://vbforums.com/showthread.php?s=&threadid=242250

    AcE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width