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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Winforms text box saving and loading

Winforms text box saving and loading

Scheduled Pinned Locked Moved C#
csharpwinformsjsonquestion
5 Posts 2 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.
  • J Offline
    J Offline
    jeweladdict
    wrote on last edited by
    #1

    I have a form with 20+ text boxes and other controls that get configured by the user at startup. Is there anyway to save the state that every control is in, including the text in the text boxes so that the user can load them later? I was messing around with serialization of the form, but I can't seem to get that to work. Thanks!

    C 1 Reply Last reply
    0
    • J jeweladdict

      I have a form with 20+ text boxes and other controls that get configured by the user at startup. Is there anyway to save the state that every control is in, including the text in the text boxes so that the user can load them later? I was messing around with serialization of the form, but I can't seem to get that to work. Thanks!

      C Offline
      C Offline
      CWIZO
      wrote on last edited by
      #2

      Why don't you save your values to a xml file or a database and then retrive them from there? -------------------------------------------------------- My development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

      J 1 Reply Last reply
      0
      • C CWIZO

        Why don't you save your values to a xml file or a database and then retrive them from there? -------------------------------------------------------- My development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

        J Offline
        J Offline
        jeweladdict
        wrote on last edited by
        #3

        wouldnt that be the same as writing it to a text file? What benefits are there to the xml file, and is there an easy way of doing it? I know with datagrids you can do the writeXML command, is there soemthign similar?

        C J 2 Replies Last reply
        0
        • J jeweladdict

          wouldnt that be the same as writing it to a text file? What benefits are there to the xml file, and is there an easy way of doing it? I know with datagrids you can do the writeXML command, is there soemthign similar?

          C Offline
          C Offline
          CWIZO
          wrote on last edited by
          #4

          Search this site for XML tutorials. It is quite simple once you get a hang of it... -------------------------------------------------------- My development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

          1 Reply Last reply
          0
          • J jeweladdict

            wouldnt that be the same as writing it to a text file? What benefits are there to the xml file, and is there an easy way of doing it? I know with datagrids you can do the writeXML command, is there soemthign similar?

            J Offline
            J Offline
            jeweladdict
            wrote on last edited by
            #5

            I guess what I'm looking for is a function that will let me do a foreach( control in form ) { save all properties of control to file } or a Save state of form function

            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