Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Visual Basic 2010

Similar presentations


Presentation on theme: "Introduction to Visual Basic 2010"— Presentation transcript:

1 Introduction to Visual Basic 2010

2 Make sure that you can see the Solution Explorer, theProperty Window and the ToolBox

3 Click on File/New Project

4 Select Windows Forms Application
Name the application and then click OK.

5 Now you have the form, the solution explorer the properties and the tools so you can start creating a program. Notice that the solution explorer contains the name of the project that the programmer enters.

6 I now made up a name for the form as well.

7 Click on Save All to save your project and its form.

8 Now I can pick the place I want to save my project.

9 Click on the form to bring up its properties and then enter in the title in the text field.

10 First I click in the toolbox to show common controls and then I drag the label over to the form. Note that I now see the properties for that label.

11 Now I change the text from Label1 to Name:

12 I name the label lblName because it is a label with the text of Name: and I will now put up a text box where people can enter then name.

13

14 After dragging over the text box I give it a name
After dragging over the text box I give it a name. Tradition says that labels start with lbl and text boxes start with txt.

15

16

17

18

19 Double click on the button you put on the form to bring up the place to code the click event.
Double click on the button on the form that you made and this code appears. This is the code you want to execute when the button is clicked. This is called a click event.

20 You want to write Hello followed by the name you entered into the txtGreet text box. To do this we need to tell VB that we are changing the text property so we write txtGreet.text and we need to tell VB that we want to use the text in the name text box so we write txtName.text. To put the two together we use the + to concatenate.

21 I click on the arrow to run or I can use F5 or I can click on debug and click on Start debugging.
To run, I click on the arrow. The screen will come up, I enter a name and click the button.


Download ppt "Introduction to Visual Basic 2010"

Similar presentations


Ads by Google