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. Visual Basic
  4. how to enable the textbox to be able to save text??

how to enable the textbox to be able to save text??

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
11 Posts 5 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.
  • S Offline
    S Offline
    Subjugate
    wrote on last edited by
    #1

    i have a problem like i would not like my user to type in the same thing over and over again. What i would like to do is tt if the user type something in the textbox, my textbox is able to save the statement. So in future the user who wants to use the program again can just click on the dropdown arrow and select the text and not keying in everything again. Any solution to tis??

    C G 3 Replies Last reply
    0
    • S Subjugate

      i have a problem like i would not like my user to type in the same thing over and over again. What i would like to do is tt if the user type something in the textbox, my textbox is able to save the statement. So in future the user who wants to use the program again can just click on the dropdown arrow and select the text and not keying in everything again. Any solution to tis??

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

      You need to write the code to store it somewhere.  A textbox isn't going to do that, and it's the wrong place to write the code to store your information.  Where do you want to store it ?

      Christian Graus - C++ MVP

      1 Reply Last reply
      0
      • S Subjugate

        i have a problem like i would not like my user to type in the same thing over and over again. What i would like to do is tt if the user type something in the textbox, my textbox is able to save the statement. So in future the user who wants to use the program again can just click on the dropdown arrow and select the text and not keying in everything again. Any solution to tis??

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

        Also, it appears you want a combo box, not a text box.  Probably you want to store past choices as Xml, I would suspect.

        Christian Graus - C++ MVP

        S 1 Reply Last reply
        0
        • C Christian Graus

          Also, it appears you want a combo box, not a text box.  Probably you want to store past choices as Xml, I would suspect.

          Christian Graus - C++ MVP

          S Offline
          S Offline
          Subjugate
          wrote on last edited by
          #4

          Currently in my application i am using textbox. wat i mean is if the user type in for example 'myproject.com.sg' and tis phrase wil be save and the next time the user will not have to type in anymore but can select from a dropdown arrow. i am doing sumthing like combo but as i know the variable we have to preset ourselves and it is not fexible. What i need to save is wat the user type in and i cant hardcode wat they ared going to type.

          C 1 Reply Last reply
          0
          • S Subjugate

            Currently in my application i am using textbox. wat i mean is if the user type in for example 'myproject.com.sg' and tis phrase wil be save and the next time the user will not have to type in anymore but can select from a dropdown arrow. i am doing sumthing like combo but as i know the variable we have to preset ourselves and it is not fexible. What i need to save is wat the user type in and i cant hardcode wat they ared going to type.

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

            OK, so do what I said.  Use a combobox and store the text that is entered to an XML file.

            Christian Graus - C++ MVP

            S 1 Reply Last reply
            0
            • C Christian Graus

              OK, so do what I said.  Use a combobox and store the text that is entered to an XML file.

              Christian Graus - C++ MVP

              S Offline
              S Offline
              Subjugate
              wrote on last edited by
              #6

              how to?? i do not know how to use XML. Do u have any example of wat should i do?

              C 1 Reply Last reply
              0
              • S Subjugate

                how to?? i do not know how to use XML. Do u have any example of wat should i do?

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

                I am going out.  A DataSet can save/load XML, or you can use an XmlDocument.

                Christian Graus - C++ MVP

                S 1 Reply Last reply
                0
                • C Christian Graus

                  I am going out.  A DataSet can save/load XML, or you can use an XmlDocument.

                  Christian Graus - C++ MVP

                  S Offline
                  S Offline
                  Subjugate
                  wrote on last edited by
                  #8

                  still dun understand.. Any site whereby i can refer to?

                  M C 2 Replies Last reply
                  0
                  • S Subjugate

                    still dun understand.. Any site whereby i can refer to?

                    M Offline
                    M Offline
                    MyFathersSon
                    wrote on last edited by
                    #9

                    mystring = text1.text //store what they've entered in a string combo1.additem mystring //store what's in the textbox in a combo next time user uses the system they drop down the combo to find their item and don't enter text in the text box

                    1 Reply Last reply
                    0
                    • S Subjugate

                      still dun understand.. Any site whereby i can refer to?

                      C Offline
                      C Offline
                      Colin Angus Mackay
                      wrote on last edited by
                      #10

                      Subjugate wrote:

                      Any site whereby i can refer to?

                      This one. There are plenty examples of how to use XML if you search the articles.


                      *** Developer Day 4 in Reading, England on 2nd December 2006 - Registration Now Open *** Upcoming Scottish Developers events: * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog | Photos

                      1 Reply Last reply
                      0
                      • S Subjugate

                        i have a problem like i would not like my user to type in the same thing over and over again. What i would like to do is tt if the user type something in the textbox, my textbox is able to save the statement. So in future the user who wants to use the program again can just click on the dropdown arrow and select the text and not keying in everything again. Any solution to tis??

                        G Offline
                        G Offline
                        GaryT80
                        wrote on last edited by
                        #11

                        You can also use SQL or Access to store the input data. Although I suspets it would be slower than going the XML route. But if you have no experience with XML this may be the way to go. It should be fairly easy. Just create a SPROC that updates the table after each entry and on page load fills a dataset that populates the comboBox. I know I was really broad but you can find hundreds of sites on how to accomplish this. Good Luck. GT

                        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