471,318 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,318 software developers and data experts.

Text Box

I am trying to learn how to program and have an exercise to complete that I
have no idea where to begin. The exercise is "Create a new project and add 2
text boxes and 1 button to the form. Write code that, when the button is
clicked, places the text in the first text box into the second text box.
Hint: Use the Text property of the text box controls."

I have created the interface and am trying to code the button to execute the
action but not sure what to do.

any help is appreciated.
Jun 27 '08 #1
5 1967
If you double click on the button, it will create an event-handler and
link it up, so all you need to do is add some code.

For example, inside the "{something}_Click" method it creates, you could
write (guessing at the names):

textBox2.Text = textBox1.Text;

Does that get yuo started?

Marc
Jun 27 '08 #2
Just try

textbox2.text = textbox1.text;

and this will resolve the issue.

--
Regards,
Mudassar Hassan
Software Engineer
http://mudassarhassan.spaces.live.com/
"tracktor" wrote:
I am trying to learn how to program and have an exercise to complete that I
have no idea where to begin. The exercise is "Create a new project and add 2
text boxes and 1 button to the form. Write code that, when the button is
clicked, places the text in the first text box into the second text box.
Hint: Use the Text property of the text box controls."

I have created the interface and am trying to code the button to execute the
action but not sure what to do.

any help is appreciated.
Jun 27 '08 #3
That did it! Thanks

I am reading "Teach Yourself C# in 24 hours" where this exercise came from.
I am new to programming and determined to learn to program. This is the very
first book I have picked up on programming. And I knew nothing about
programming before I picked it up. I can tell that this isn't going to be
something that I or anyone will learn in 24 hours, because I have over that
amount of time invested and I am only in chapter 3. They should rename this
book to "Teach Yourself C# in 10 years, lesson 1 of 1000" LOL

I already have ASP.Net 2.0 in 24 hours, SQL in 24 hours, C# in 21 days and
Visual Studios.Net 2003 in 21 days, that I intend on reading to help me
learn. Is there any recomendations that you might have that will help me
learn to program?

Your help is much appreciated.

"Marc Gravell" wrote:
If you double click on the button, it will create an event-handler and
link it up, so all you need to do is add some code.

For example, inside the "{something}_Click" method it creates, you could
write (guessing at the names):

textBox2.Text = textBox1.Text;

Does that get yuo started?

Marc
Jun 27 '08 #4
Is there any recomendations that you might have that will help me
learn to program?
Stick at it. To be honest though, I would be extremely dubious of any
book with "in 24 hours" in the title unless it is aimed at the
experienced developer, but in a different area (for example, a C#
developer could probably pick up the language basics of VB.NET in 24
hours - but that still wouldn't make them a "VB developer" properly).

The main thing is to ensure that whatever book (etc) you use is aimed at
your current leve.

Marc
Jun 27 '08 #5
Thanks Marc

"Marc Gravell" wrote:
Is there any recomendations that you might have that will help me
learn to program?

Stick at it. To be honest though, I would be extremely dubious of any
book with "in 24 hours" in the title unless it is aimed at the
experienced developer, but in a different area (for example, a C#
developer could probably pick up the language basics of VB.NET in 24
hours - but that still wouldn't make them a "VB developer" properly).

The main thing is to ensure that whatever book (etc) you use is aimed at
your current leve.

Marc
Jun 27 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Xerxes | last post: by
2 posts views Thread by Macsicarr | last post: by
2 posts views Thread by Jiri Palecek | last post: by
4 posts views Thread by Arif Çimen | last post: by
3 posts views Thread by jweinberg1975 | last post: by
3 posts views Thread by bbepristis | last post: by
10 posts views Thread by bluemountain | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.