It says user, you are x years old.” Change User and X to be the values from “Hello, the text box. Extra notes for extra especially brilliant people Let’s break down what this actually means. Public Form1 End Class All code in VB is contained in what’s called a Class. Classes are part of a programming technique called Orientation” which we are not going to cover at present (you “Object can thank me later). Suffice to say that all the things you want your program to do are contained within the class which has the same name as your form. Private Sub btnDisplayGreeting_Click(sender As Object, e As EventArgs) Handles btnDisplayGreeting.Click End Sub Code in VB is split up in to or sub routines. These are small pieces of code that “Subs” make a control work. These are by events. So when you click the button, in this “triggered” case it triggers the event as you can see above. It even says that “btnDisplayGreeting.Click” the sub that event. “handles” Each sub has a name in this case. Later you will learn to make – btnDisplayGreeting_click your own subs. All code in a sub is executed when the occurs and then when sub” is reached, it “end goes back to waiting for more events to happen.
It says “Hello, user, you are x years old.” Change User and X to be the values from the text box. Extra notes for extra especially brilliant people Let’s break down what this actually means. Public Form1 End Class All code in VB is contained in what’s called a Class. Classes are part of a programming technique called “Object Orientation” which we are not going to cover at present (you can thank me later). Suffice to say that all the things you want your program to do are contained within the class which has the same name as your form. Private Sub btnDisplayGreeting_Click(sender As Object, e As EventArgs) Handles btnDisplayGreeting.Click End Sub Code in VB is split up in to “Subs” or sub routines. These are small pieces of code that make a control work. These are “triggered” by events. So when you click the button, in this case it triggers the event “btnDisplayGreeting.Click” as you can see above. It even says that the sub “handles” that event. Each sub has a name – btnDisplayGreeting_click in this case. Later you will learn to make your own subs. All code in a sub is executed when the occurs and then when “end sub” is reached, it goes back to waiting for more events to happen.
introduction_to_programming.docx