Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Saving list box contents

Saving list box contents

Scheduled Pinned Locked Moved C#
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wolf92
    wrote on last edited by
    #1

    Hi! How do I save the contents of a list box, so that when the user shuts down the program, they click a button called save and the next time they open it, it is still there?

    M R 2 Replies Last reply
    0
    • W Wolf92

      Hi! How do I save the contents of a list box, so that when the user shuts down the program, they click a button called save and the next time they open it, it is still there?

      R Offline
      R Offline
      rah_sin
      wrote on last edited by
      #2

      if ur using any database the u can store it in table at the time of closing application or u can use Xml file to store ur content.

      rahul

      1 Reply Last reply
      0
      • W Wolf92

        Hi! How do I save the contents of a list box, so that when the user shuts down the program, they click a button called save and the next time they open it, it is still there?

        M Offline
        M Offline
        MCSD Gandalf
        wrote on last edited by
        #3

        It would be REAL handy to know what type of application you're talking about, but I'm assuming a Windows app. Generally it would be really easy to save the contents to a small XML file, then at startup check to see if that file is present. If it is, put the contents back in the listbox, and if not, it would be empty. HTH WhiteWizard aka Gandalf

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups