I want to start the tutorials out simple, over time I plan on making them more complex and ... useful.
First we need to download the required software to run our compiler.
Install by following the on-screen instructions.
Start Visual Studio C# 2010 Express, click new project, select "Windows" from the list on the left, then select "Windows Form Application", name the project and press Ok.
Lets start by adding a Text box, Button, and Label.
click on the "Toolbox" tab located on the left side of the screen, select button and drag it on to our form. Repeat the process to add a Textbox and Label.
You can now edit the attributes of these objects. For example lets change the name of the button to "Submit." Click the button then in the properties box on the right side of the screen find the field called "text", erase "button1" and replace it with "Submit".
Your screen should now look like this:

Now lets edit the code. One way of doing this is to right click anywhere on the form and select "View Code". Since we need to edit the button for this example we need to double click the button labeled "Submit". Here we can manipulate our form via C#.
In the button1_click method add the following line:
label1 - is describing the name of the label we added
.Text - is telling C# that the value we are about to receive needs to be stored as text for that label
= - lol
textbox1 - is describing the name of the textbox we added
.Text - same as before
; - Aways add these at the end of the command
Run your program and view the result.
... I was going to add more but I'm tried, I'll add more another day.
If you have any questions or requests please don't hesitate to post them.
First we need to download the required software to run our compiler.
- Visual Studio C# 2010 Express Here (Select Visual C# 2010 Express and pick your language)
Install by following the on-screen instructions.
Start Visual Studio C# 2010 Express, click new project, select "Windows" from the list on the left, then select "Windows Form Application", name the project and press Ok.
Lets start by adding a Text box, Button, and Label.
click on the "Toolbox" tab located on the left side of the screen, select button and drag it on to our form. Repeat the process to add a Textbox and Label.
You can now edit the attributes of these objects. For example lets change the name of the button to "Submit." Click the button then in the properties box on the right side of the screen find the field called "text", erase "button1" and replace it with "Submit".
Your screen should now look like this:
| This image has been resized. Click this bar to view the full image. The original image is sized 1280x778. |

Now lets edit the code. One way of doing this is to right click anywhere on the form and select "View Code". Since we need to edit the button for this example we need to double click the button labeled "Submit". Here we can manipulate our form via C#.
In the button1_click method add the following line:
Code:
label1.Text = textBox1.Text;
.Text - is telling C# that the value we are about to receive needs to be stored as text for that label
= - lol
textbox1 - is describing the name of the textbox we added
.Text - same as before
; - Aways add these at the end of the command
Run your program and view the result.
... I was going to add more but I'm tried, I'll add more another day.
If you have any questions or requests please don't hesitate to post them.



0 komentar:
Post a Comment