Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27355

Copy Text from one textbox to another textbox with VB 2010

$
0
0
Hey everyone, I am hoping I am putting this in the correct spot. I am a complete noob to Visual Basic 2010 and I am trying my hardest to learn the language. I have just recently finished reading the book "Teach Yourself Visual Basic in 21 Days" and it helped a little bit but I am still a little bit lost. I want to learn Visual Basic.NET but I can't find any good learning material for beginners ( I know this is unrelevant to the Title and what the actual question is, but I am hoping someone will know some good material, because I can't find anything!). Any help with that will be very apprecaited.

My actual question is this. I am running Visual Basic 2010 Ultimate. I am creating a program that will take take text from one textbox and move it to a different textbox depending on which button is clicked. So when I click the button I want it to move from the first textbox to the second textbox (on the same form). I can't figure it out for the life of me and I can't word it right for anything helpful to show up using Google and on the forums. I am hoping I am giving enough Information.

Then I have a listbox and a list view box that I want the same thing to happen with. If a person hits the button I want the listbox to send the text to a textbox on the same form. And the list view box, when a person clicks the button I want the text to be sent to a textbox.

I also need help with deleting items from a textbox. I figured out how to send the text from one textbox to another by using this code:
Code:

Private Sub txtBoxAddNotDone_Click(sender As System.Object, e As System.EventArgs) Handles txtBoxAddNotDone.Click

Dim str1 As String = Me.textbox.Text
Me.ProgramsBoxNotDone.Text = str1

'Make the textbox delete the text once the button is clicked
textBox.Text = String.Empty

Is that good enough to make that work? Once a user sends the text to one of the textboxes by either using the textbox, listbox or listview and the user wants to delete the text only from the one textbox what kind of code would I use for this?

Once the user sends the textbox from either the listbox or the listview, will the content still stay in the listbox and listview. Like I mean the user clicks the button to send it to the textbox, the content goes into the textbox, will the content still stay in the textbox, the listview and the listbox?

I'm sorry I am asking a lot of questions, I just really can't figure out a good way of doing all this. I hope I haven't missed anything on the forums. I found some code but it wouldn't work and now that I am sending this I can't find the code. Please don't get irritated with me! I just need some help to get started!! And if anyone knows any .NET learning materials for beginners or database learning materials for beginners for Visual Basic 2010 please let me know! I need all the help I can get!!

Thank you in advance and sorry for being such a noob!

Viewing all articles
Browse latest Browse all 27355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>