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. Accepting user input

Accepting user input

Scheduled Pinned Locked Moved C#
csharphelpquestion
31 Posts 12 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi friends, I've a WinForm consisting of a TextBox and a button. Now, I want that, whenever user enters any text in the text box and clicks the button, the entered text be saved in a precreated text file. What code should I implement in the Button_Click event handler in order to do so? Help appreciated, Rajdeep.NET :-D

    P T F OriginalGriffO L 6 Replies Last reply
    0
    • L Lost User

      Hi friends, I've a WinForm consisting of a TextBox and a button. Now, I want that, whenever user enters any text in the text box and clicks the button, the entered text be saved in a precreated text file. What code should I implement in the Button_Click event handler in order to do so? Help appreciated, Rajdeep.NET :-D

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Rajdeep.NET wrote:

      What code should I implement in the Button_Click event handler in order to do so?

      Code to write the file out. Now, buy a book and find out what that code is. I can't believe that you've posted questions about how to sell your software when this limping pile of scrodspittle is the level of competence you are currently at. Do yourself a favour - buy some books; then read them.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      L L V 3 Replies Last reply
      0
      • L Lost User

        Hi friends, I've a WinForm consisting of a TextBox and a button. Now, I want that, whenever user enters any text in the text box and clicks the button, the entered text be saved in a precreated text file. What code should I implement in the Button_Click event handler in order to do so? Help appreciated, Rajdeep.NET :-D

        T Offline
        T Offline
        tom572007
        wrote on last edited by
        #3

        Warning, its a hard manipulation

        1 Reply Last reply
        0
        • L Lost User

          Hi friends, I've a WinForm consisting of a TextBox and a button. Now, I want that, whenever user enters any text in the text box and clicks the button, the entered text be saved in a precreated text file. What code should I implement in the Button_Click event handler in order to do so? Help appreciated, Rajdeep.NET :-D

          F Offline
          F Offline
          fly904
          wrote on last edited by
          #4

          Rajdeep.NET wrote:

          You should have googled for this, before posting it here.

          My failometer is detecting vast quantities of FAIL! "Its SQL - hardly programming..." (Caslen)

          1 Reply Last reply
          0
          • L Lost User

            Hi friends, I've a WinForm consisting of a TextBox and a button. Now, I want that, whenever user enters any text in the text box and clicks the button, the entered text be saved in a precreated text file. What code should I implement in the Button_Click event handler in order to do so? Help appreciated, Rajdeep.NET :-D

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #5

            I was just this minute wondering where Rajdeep.NETs' Stupid Question Of The Day was, and lo! You write it! Thanks. (Now, go and get a book on C#, a book on .NET and a book on programming generally. Lock yourself in your room, and don't come out until you have read them.)

            No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            P L 2 Replies Last reply
            0
            • OriginalGriffO OriginalGriff

              I was just this minute wondering where Rajdeep.NETs' Stupid Question Of The Day was, and lo! You write it! Thanks. (Now, go and get a book on C#, a book on .NET and a book on programming generally. Lock yourself in your room, and don't come out until you have read them.)

              No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              OriginalGriff wrote:

              Lock yourself in your room, and don't come out until you have read them.

              There - fixed that for you.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              H 1 Reply Last reply
              0
              • P Pete OHanlon

                OriginalGriff wrote:

                Lock yourself in your room, and don't come out until you have read them.

                There - fixed that for you.

                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                My blog | My articles | MoXAML PowerToys | Onyx

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

                :laugh: :laugh: :laugh:

                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
                • P Pete OHanlon

                  Rajdeep.NET wrote:

                  What code should I implement in the Button_Click event handler in order to do so?

                  Code to write the file out. Now, buy a book and find out what that code is. I can't believe that you've posted questions about how to sell your software when this limping pile of scrodspittle is the level of competence you are currently at. Do yourself a favour - buy some books; then read them.

                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                  My blog | My articles | MoXAML PowerToys | Onyx

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Pete O'Hanlon wrote:

                  Code to write the file out. Now, buy a book and find out what that code is.

                  Hi Pete, Why do you think like that? I searched for the above matter in Google and MSDN. I indeed found million results, but all based upon console application. I ain't a dumb. I remember what I said, "You should have searched google before posting here", and I did and it resulted in futile. Now thats the reason for asking you guys. Hope you understand me, Rajdeep.NET :sigh:

                  T D P 3 Replies Last reply
                  0
                  • L Lost User

                    Pete O'Hanlon wrote:

                    Code to write the file out. Now, buy a book and find out what that code is.

                    Hi Pete, Why do you think like that? I searched for the above matter in Google and MSDN. I indeed found million results, but all based upon console application. I ain't a dumb. I remember what I said, "You should have searched google before posting here", and I did and it resulted in futile. Now thats the reason for asking you guys. Hope you understand me, Rajdeep.NET :sigh:

                    T Offline
                    T Offline
                    Tom Deketelaere
                    wrote on last edited by
                    #9

                    Rajdeep.NET wrote:

                    Why do you think like that?

                    Because writing to a text file is the most basic programming you can do. Almost all books / classes cover this in the first chapter / lesson.

                    Rajdeep.NET wrote:

                    all based upon console application

                    The code for writing to a text file remains the same for console applications or for winform applications.

                    L 1 Reply Last reply
                    0
                    • OriginalGriffO OriginalGriff

                      I was just this minute wondering where Rajdeep.NETs' Stupid Question Of The Day was, and lo! You write it! Thanks. (Now, go and get a book on C#, a book on .NET and a book on programming generally. Lock yourself in your room, and don't come out until you have read them.)

                      No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      OriginalGriff wrote:

                      I was just this minute wondering where Rajdeep.NETs' Stupid Question Of The Day was, and lo! You write it! Thanks

                      :sigh: Why do you think so Griff??!! If you think that what I asked was really that stupid to be termed as the day's most stupid question, then just post the code here and I would appreciate you as a genius. Otherwise, just commenting on my posts, makes you the same as I am. So???..... Rajdeep.NET ;P

                      D OriginalGriffO 2 Replies Last reply
                      0
                      • L Lost User

                        Pete O'Hanlon wrote:

                        Code to write the file out. Now, buy a book and find out what that code is.

                        Hi Pete, Why do you think like that? I searched for the above matter in Google and MSDN. I indeed found million results, but all based upon console application. I ain't a dumb. I remember what I said, "You should have searched google before posting here", and I did and it resulted in futile. Now thats the reason for asking you guys. Hope you understand me, Rajdeep.NET :sigh:

                        D Offline
                        D Offline
                        Dave Kreskowiak
                        wrote on last edited by
                        #11

                        Rajdeep.NET wrote:

                        Why do you think like that?

                        Because you asked a question that is so basic. Adding text to a testfile can be done in a single line of code in VB.NET. If you don't know this, you can't possibly know other things that you would need to know to write an decent software anyone would want to buy!

                        Rajdeep.NET wrote:

                        I indeed found million results, but all based upon console application.

                        There is no difference between writing to a textfile in a Console app and a Windows Forms app.

                        Rajdeep.NET wrote:

                        and I did and it resulted in futile

                        No, it didn't. What was futile was you didn't even TRY what you saw in your own application. This simple concept "Try it and see what happens" is what is going to hold you back as a developer.

                        A guide to posting questions on CodeProject[^]
                        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                             2006, 2007, 2008

                        1 Reply Last reply
                        0
                        • T Tom Deketelaere

                          Rajdeep.NET wrote:

                          Why do you think like that?

                          Because writing to a text file is the most basic programming you can do. Almost all books / classes cover this in the first chapter / lesson.

                          Rajdeep.NET wrote:

                          all based upon console application

                          The code for writing to a text file remains the same for console applications or for winform applications.

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #12

                          Tom Deketelaere wrote:

                          The code for writing to a text file remains the same for console applications or for winform applications

                          Is that so? I wonder!!! :omg: Can you post me the code for doing this in a Win application? Dont worry about Console, I'll make that out :-O

                          T 1 Reply Last reply
                          0
                          • L Lost User

                            OriginalGriff wrote:

                            I was just this minute wondering where Rajdeep.NETs' Stupid Question Of The Day was, and lo! You write it! Thanks

                            :sigh: Why do you think so Griff??!! If you think that what I asked was really that stupid to be termed as the day's most stupid question, then just post the code here and I would appreciate you as a genius. Otherwise, just commenting on my posts, makes you the same as I am. So???..... Rajdeep.NET ;P

                            D Offline
                            D Offline
                            Dave Kreskowiak
                            wrote on last edited by
                            #13

                            Rajdeep.NET wrote:

                            I would appreciate you as a genius.

                            Who cares... We don't get paid to write the code for you so you can copy'n'paste it into your own code and take credit for it. Besides, it's the same code you've been seeing in all the Console app examples. This tells us that you obviously don't understand the concepts behind writing to a file, nor do you understand what the code your looking at does. This makes it virtually impossible for you to support the code and expand on it in your own software.

                            A guide to posting questions on CodeProject[^]
                            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                                 2006, 2007, 2008

                            L 1 Reply Last reply
                            0
                            • L Lost User

                              Tom Deketelaere wrote:

                              The code for writing to a text file remains the same for console applications or for winform applications

                              Is that so? I wonder!!! :omg: Can you post me the code for doing this in a Win application? Dont worry about Console, I'll make that out :-O

                              T Offline
                              T Offline
                              Tom Deketelaere
                              wrote on last edited by
                              #14

                              Rajdeep.NET wrote:

                              Is that so?

                              YES

                              Rajdeep.NET wrote:

                              Can you post me the code for doing this in a Win application? Dont worry about Console, I'll make that out

                              NO How about you actually trying the code you found, and do some work of your own.

                              L 1 Reply Last reply
                              0
                              • D Dave Kreskowiak

                                Rajdeep.NET wrote:

                                I would appreciate you as a genius.

                                Who cares... We don't get paid to write the code for you so you can copy'n'paste it into your own code and take credit for it. Besides, it's the same code you've been seeing in all the Console app examples. This tells us that you obviously don't understand the concepts behind writing to a file, nor do you understand what the code your looking at does. This makes it virtually impossible for you to support the code and expand on it in your own software.

                                A guide to posting questions on CodeProject[^]
                                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                                     2006, 2007, 2008

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #15

                                Dave Kreskowiak wrote:

                                We don't get paid to write the code for you so you can copy'n'paste it into your own code and take credit for it

                                Alright Mr. Dave Kreskowiak, as you wish. You also have a point. Finally, I discovered that I am the most idiot //programmer (calling myself a programmer will be wrong) codeproject ever had in its forums. I'll make sure I learn the basics first. Thanks for all your advice. Rajdeep.NET (starving to be a developer) :doh:

                                D 1 Reply Last reply
                                0
                                • T Tom Deketelaere

                                  Rajdeep.NET wrote:

                                  Is that so?

                                  YES

                                  Rajdeep.NET wrote:

                                  Can you post me the code for doing this in a Win application? Dont worry about Console, I'll make that out

                                  NO How about you actually trying the code you found, and do some work of your own.

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #16

                                  Tom Deketelaere wrote:

                                  How about you actually trying the code you found, and do some work of your own.

                                  Ok, thanks.

                                  T 1 Reply Last reply
                                  0
                                  • L Lost User

                                    Pete O'Hanlon wrote:

                                    Code to write the file out. Now, buy a book and find out what that code is.

                                    Hi Pete, Why do you think like that? I searched for the above matter in Google and MSDN. I indeed found million results, but all based upon console application. I ain't a dumb. I remember what I said, "You should have searched google before posting here", and I did and it resulted in futile. Now thats the reason for asking you guys. Hope you understand me, Rajdeep.NET :sigh:

                                    P Offline
                                    P Offline
                                    Pete OHanlon
                                    wrote on last edited by
                                    #17

                                    Rajdeep.NET wrote:

                                    Why do you think like that? I

                                    I think like this because there are times when Google is sufficient, but if you haven't got the basics down then it ain't going to help. That's where a book will help - it will guide you through from the simplest tasks (assuming it's a good book).

                                    "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                    As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                    My blog | My articles | MoXAML PowerToys | Onyx

                                    N 1 Reply Last reply
                                    0
                                    • L Lost User

                                      Tom Deketelaere wrote:

                                      How about you actually trying the code you found, and do some work of your own.

                                      Ok, thanks.

                                      T Offline
                                      T Offline
                                      tom572007
                                      wrote on last edited by
                                      #18

                                      It's time to start working dude

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        Hi friends, I've a WinForm consisting of a TextBox and a button. Now, I want that, whenever user enters any text in the text box and clicks the button, the entered text be saved in a precreated text file. What code should I implement in the Button_Click event handler in order to do so? Help appreciated, Rajdeep.NET :-D

                                        L Offline
                                        L Offline
                                        Lost User
                                        wrote on last edited by
                                        #19

                                        It's to early in the morning to be sarcastic, it's especially to early to read your stupidity.

                                        Check out the CodeProject forum Guidelines[^]

                                        1 Reply Last reply
                                        0
                                        • P Pete OHanlon

                                          Rajdeep.NET wrote:

                                          Why do you think like that? I

                                          I think like this because there are times when Google is sufficient, but if you haven't got the basics down then it ain't going to help. That's where a book will help - it will guide you through from the simplest tasks (assuming it's a good book).

                                          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                          As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                          My blog | My articles | MoXAML PowerToys | Onyx

                                          N Offline
                                          N Offline
                                          Nagy Vilmos
                                          wrote on last edited by
                                          #20

                                          Pete O'Hanlon wrote:

                                          it will guide you through from the simplest tasks (assuming you can read).

                                          fixed it. :laugh:


                                          Panic, Chaos, Destruction. My work here is done.

                                          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