Solved

Moving text between textboxes

Posted on 2006-10-20
3
221 Views
Last Modified: 2010-04-23
I have a form with two textboxes and two buttons and want to do the following:

When btnPush1 is selected, the contents of txtBox1 are copied to txtBox2, and when btnPush2 is pressed, the contents of txtBox2 are copied to txtBox1.

I know it has something to do the textbox properties, but I'm extremely new at this and can't figure it out...

Thanks
0
Comment
Question by:jlavetan
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
newyuppie earned 50 total points
Comment Utility
do these work for you?


private sub btnPush1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPush1.Click
      txtbox2.text = textbox1.text
end sub

private sub btnPush2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPush2.Click
      txtbox1.text = textbox2.text
end sub


NY
0
 
LVL 1

Author Comment

by:jlavetan
Comment Utility
Yep, that was it...  I could of sworn I had that... I guess I had some syntax wrong...

Thanks!
0
 
LVL 13

Expert Comment

by:newyuppie
Comment Utility
glad it worked out! thanks for the grade

NY
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now