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. how to keep the values in the form

how to keep the values in the form

Scheduled Pinned Locked Moved C#
helptutorial
6 Posts 4 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.
  • A Offline
    A Offline
    Anjani Poornima
    wrote on last edited by
    #1

    hello, In my application i am having a form with textbox fields and one button exit. when the form is closed and opened for the second time i like to see the values already i had entered in the textboxes for the first time. plz help me how i can do this.... Thnaks in advance

    C M 2 Replies Last reply
    0
    • A Anjani Poornima

      hello, In my application i am having a form with textbox fields and one button exit. when the form is closed and opened for the second time i like to see the values already i had entered in the textboxes for the first time. plz help me how i can do this.... Thnaks in advance

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      They obviously do not come from thin air. You can store them in a file, in a database ( but if you don't already have one, that seems like a waste of time ), or in the registry. I'd store them in an XML file.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      A 1 Reply Last reply
      0
      • C Christian Graus

        They obviously do not come from thin air. You can store them in a file, in a database ( but if you don't already have one, that seems like a waste of time ), or in the registry. I'd store them in an XML file.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        A Offline
        A Offline
        Anjani Poornima
        wrote on last edited by
        #3

        hello, yah i know how to save the values entered in the form into the database and well i know how to retrive the values from the database. what i need is when the form is closed and opened for the second time i like to see the values what i had entered previously. Thanks in advance

        H C 2 Replies Last reply
        0
        • A Anjani Poornima

          hello, yah i know how to save the values entered in the form into the database and well i know how to retrive the values from the database. what i need is when the form is closed and opened for the second time i like to see the values what i had entered previously. Thanks in advance

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          Anjani Poornima wrote:

          yah i know how to save the values entered in the form into the database and well i know how to retrive the values from the database.

          If you know both of those things, then you already know how to retrieve them the second, or any, time the form is opened. simply do it in the Load event handler of the Form in question.

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          1 Reply Last reply
          0
          • A Anjani Poornima

            hello, In my application i am having a form with textbox fields and one button exit. when the form is closed and opened for the second time i like to see the values already i had entered in the textboxes for the first time. plz help me how i can do this.... Thnaks in advance

            M Offline
            M Offline
            Mycroft Holmes
            wrote on last edited by
            #5

            you have 2 choices either store the data locally as CG suggested or use form.hide(), this will require you to manage the open form differently but the form values will not change between open/hide events.

            1 Reply Last reply
            0
            • A Anjani Poornima

              hello, yah i know how to save the values entered in the form into the database and well i know how to retrive the values from the database. what i need is when the form is closed and opened for the second time i like to see the values what i had entered previously. Thanks in advance

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              I don't understand your question then. You know how to use a database, but you don't get that if you want to store the values in your textboxes, you need to write code to store them, and to retrieve the values ?

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              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