Simple application Help, please

  • Thread starter Thread starter Ali
  • Start date Start date
A

Ali

Hello everyone,

I'm trying to do something simple, like making a form with 1 textBox + 1
Button + 1 Lable

making the user enter a name in the textBox and when the Button clicked..
the Lable shows the name.

tried many ways, and I know it's something I'm blindly passing.

Thanks for the answers in advance.
 
Ali said:
Hello everyone,

I'm trying to do something simple, like making a form with 1 textBox + 1
Button + 1 Lable

Create a new project, using the "Windows Forms Application" template.

Use the Designer to drag onto the form your TextBox, Button, and Label.
making the user enter a name in the textBox and when the Button
clicked.. the Lable shows the name.

In the Designer, double-click on the Button. This will insert a method
stub into your Form sub-class, and automatically subscribe the method as
the event handler for the Button's Click event.

In that method, include this line of code:

label1.Text = textBox1.Text;

(where "label1" and "textBox1" are the field names for your Label and
TextBox controls, respectively...the names I've given above are the
defaults).
tried many ways, and I know it's something I'm blindly passing.

In general, if you have tried some way and it doesn't work, it is
helpful to actually describe what you _have_ tried, so that people are
better able to understand what you've done wrong and what advice you need.

If the above does not help you, you need to provide better details in
your question, including posting the code that doesn't work/doesn't do
what you want it to.

Pete
 
Back
Top