Presentation is loading. Please wait.

Presentation is loading. Please wait.

Controls, Properties, and Procedures

Similar presentations


Presentation on theme: "Controls, Properties, and Procedures"— Presentation transcript:

1 Controls, Properties, and Procedures
090500

2 VB Coding Code colors Commenting
Procedures (Subroutines and Functions) Objects: Controls

3 Code Colors Black – General coding, Objects Blue – Keywords
Green - Other

4 Commenting Add comments (start line with an apostrophe) to EXPLAIN EVERY SECTION OF CODE. Comments are great ways to quickly hide unwanted code from the computer.

5 Procedures A procedure is a section of code that performs a specific task A subroutine is a procedure. Events call subroutines. Your program may also call a subroutine. A function is a procedure that returns a value. Subroutines that contain formulas that return values are functions.

6 Many Functions are Built-in
Cint(MyNumber) Len(MyWord) Many Others

7 Calling Subroutines and Procedures
Call MySubroutine() MySubroutine() MyCircumference=_ MyCircle(myRadius)

8 Objects: Controls Controls are objects. Objects have properties and procedures (called methods) associated with them. cmdButton1.Caption =_ “My Button” lstColors.AddItem “Aqua” A method is a procedure that acts on the object that calls it. Above, the list control called the AddItem method.

9 Review Control Procedure Function Subroutine Event Method Property


Download ppt "Controls, Properties, and Procedures"

Similar presentations


Ads by Google