Chapter 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

PROG 2

CHAPTER 2
VISUAL BASIC CONCEPTS

• CLASS
• A class is a blueprint or template on which all objects are based upon. Therefore, each
object is based on a class and from this class one can create instances of itself.
VISUAL BASIC CONCEPTS

• OBJECT
• Object is an instance of a class. The object can be handled and manipulated by the
commands of a programming language.
VISUAL BASIC CONCEPTS

• PROPERTY
• Each object has different properties, it may have various properties. First, it should
have a name which is provided by the programmer.
VISUAL BASIC CONCEPTS

• METHOD
• A method is a function or procedure associated with a class. Methods define the
exhibited behavior of the object at program runtime.
VISUAL BASIC CONCEPTS

• EVENT
• An event in OOP is a user-initiated action – for example, a mouse click or
even a keyboard stroke. A program that changes its behavior in response to an
event is called an event driven program. Event driven software has the goal of
being interactive to the end user’s response via the mouse or keyboard
VISUAL BASIC MODES

• Design Time
• It is the time spent in writing and designing the codes for the user interface. This is
also the time to edit your program.
• Run Time
• It is the time spent when a user runs an application.
• Break Time
• It is the time spent in checking, debugging, and other situations. At this time, no
changes can be made to the program.
VISUAL BASIC FILES

• Solution Files (.sln)


• These are the files that a programmer manipulate and deal with. Avoid opening files
that are automatically created by Visual Basic to prevent possible errors.
• Executable Files (.exe)
• These are the files that an end user will run in the computer.
ERRORS IN VISUAL BASIC

• Syntax Error
• A syntax error is a violation or error due to wrong spelling, symbols, spacing and
other factors that make a code unacceptable.
• Logic Error
• A logic error is a program bug that causes the application to produce an incorrect or
undesired output. Logic errors can be easily overlooked because there are no error
indicators appearing on the code.
• Runtime Error
• A runtime error is detected during the execution of the program or when the
program is running. Missing files or links not available are examples of runtime error.
USING EVENTS
USING EVENTS
USING EVENTS

You might also like