Accepting user input
-
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
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)
-
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
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 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
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.
-
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.
: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.”
-
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.
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:
-
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:
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.
-
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
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
-
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:
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 -
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.
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
-
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
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 -
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
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.
-
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, 2008Dave 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:
-
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.
-
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:
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.
-
Tom Deketelaere wrote:
How about you actually trying the code you found, and do some work of your own.
Ok, thanks.
-
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
-
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.
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.
-
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
If you think I said it was "the day's most stupid question" then you also need to learn to read. For a "programmer" who intends to sell his code (cf. your previous R.NsSQOTD posts) you ask the basic questions that even a 1st year CS student learns in the first week of a C# course. I do not want, desire, or need you to appreciate me, as a genius or otherwise. I do however reserve the right to reply in any manner I see fit (within the constraints of the forum) to someone who is: 1) Trying to pass himself off as something he clearly isn't. 2) Trying to get others to do his work for him, without payment. 3) Trying to use our intectual properties for his commercial gain. 4) Wasting the time of unpaid professionals who are helping others out of the goodness of their hearts. 5) Incapable of refining a Google search (many of my initial searches give thousands, or millions of results) 6) Being rude to others, for doing exactly what he is doing, and thus hypocritical. and last but not least 7) Being a complete f****** d*******, with niether b**** or a c*** (except on his f*******). Now, do you fit in any of those categories? No - you fit in them all. [edit] P.s. Before you ask, I have nothing against ignorance, it can be cured by education. Stupidity on the other hand... [/edit]
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
-
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.
Pete O'Hanlon wrote:
this limping pile of scrodspittle is ...
it is getting all to high-brow for me now, even Google[^] doesn't help any more. ;)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
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:
Rajdeep.NET wrote:
I discovered that I am the most idiot //programmer (calling myself a programmer will be wrong) codeproject ever had in its forums.
Not even close. There have people around here who couldn't find the power switch to turn the machine on! There are a certain set of minimum skills you need to be a developer/programmer/whatever. You need the ability to do research and the ability to try things out (explore). These two things are the basis of the scientific method, or learning what you don't know in a structured manner. Without this, you don't have a prayer of becomming a decent programmer.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008