1 / 12

Visual Basic

Visual Basic. Starter Vocabulary. IDE. I ntegrated D evelopment E nvironment A setting in which programs are written, tested, debugged, etc. You could write a C program in Notepad, compile and run by typing instructions at a command prompt

amal-riggs
Download Presentation

Visual Basic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual Basic Starter Vocabulary

  2. IDE • Integrated Development Environment • A setting in which programs are written, tested, debugged, etc. • You could write a C program in Notepad, compile and run by typing instructions at a command prompt • But “integrated” means the various aspects are all put together

  3. VB is RAD • Visual Basic (VB) is considered a Rapid Applications Development (RAD) programming language since it makes the development of a Graphical User Interface (GUI) relatively simple • When you start to program in Visual Basic (VB), you are provided with a form

  4. Form • Like a window • A container (surface) for “controls” • A form is an object; it has • Properties • Methods • Events • Actually the form you see is an object, but first a form is a class, then one “instantiates” an object of that class

  5. Classes and Objects • A class is an abstract category of or template for objects • It collects the characteristics (properties) and actions (methods) common to the objects that belong to it • An object is a specific member of the class • When a specific object is made from the abstract class template, it is said to be an instantiation of the class • Initially the instantiations will be automatically done for us, but eventually we will have to do some of them for ourselves.

  6. Example • Dog would be a class • It has properties, like breed, height, weight, etc. • It has methods, like barks, eats, runs, etc. • Lassie is an object • Lassie has specific properties • Her breed is Collie; her height is 36 inches; her weight is 90 pounds; etc. • The collection of specific properties is also referred to as the state of the object

  7. Property • A property is like a variable; however, altering or accessing its value is usually done indirectly using a “guard” method. • The CommandButton object has • Height • Width • Position (left and top) • Caption • Etc.

  8. Controls • Basic interface objects instantiated on a form. For example: • buttons • scroll bars • radio buttons • menus • Controls are not necessarily visible • E.g. timer

  9. Event • A program detects that some action (an event) took place • The event may be initiated by • The user (e.g. a click) • The program (e.g. a timer) • The system (e.g. out of memory) • If the execution of a program (what is done, when it is done, etc.) depends on events, then the programming is said to be event-driven.

  10. Method • Just as properties are variables tied to an object, methods are functions or procedures tied to an object • Methods are executed when an object receives a message (a “call” plus any arguments) • VB provides the shell of methods associated with certain events and objects (the click of a command button), but you can also make your own

  11. Self-documentation • Documentation is the part of a program that has no effect on its execution but is meant to make the code more understandable to another programmer or yourself at a later date • Using variable names like “interest” so the variable name is directly associated with its purpose in the program

  12. Hungarian Notation • It is a useful practice in VB to start the name of control objects with standard prefixes followed by a self-documenting name • For example, a Button that leads to printing when clicked might be called btnPrint • A good habit is to include some capital letters when naming variables • This is an example of Hungarian notation developed by Dr. Charles Simonyi

More Related