Computer Science

Introduction To Visual Basic Application Development (Practical)


Introduction To Visual Basic Application Development

Visual Basic : Introduction
  • “Visual” refers to the method used to create what the user sees (Graphical User interface).
  • “Basic” refers to the BASIC (Beginners All-Purpose Symbolic Instruction Code) programming language.
  • It is a high-level programming language that evolved from the earlier DOS version called BASIC.
  • Visual Basic originally created to make it easier to write programs for the Windows computer operating system.
  • One of the major reasons why Visual Basic has been so successful is that it includes everything that is necessary to write programs forWindows.
  • For many years, Microsoft Visual Basic has been the world’s most popular programming language.
  • From its very beginning, Visual Basic has brought unmatched flexibility and ease of programming to theWindows platform.
  • In its previous six versions, Visual Basic evolved into an extremely powerful development tool that was equally at home in business, academia, engineering, or everywhere else in which windows applications were being created.
  • The latest version of Visual Basic, called Visual basic .NET, is the most significant evolutionary change yet in the language. (Introduction To Visual Basic)

General Features Of The Visual Basic

  • GUI:- Graphical User Interface is there to represent the program objects and also the techniques.
  • Modularization:- Good program practice to modularize program.
  • Object-Oriented:- Creating objects while writing programs.
  • Debugging:- Runtime debugger helps to find and also fix the bugs/ errors at runtime.
  • Data Access aspect:- Users can able to create a database and also retrieve data at runtime.

Introduction to Visual Studio Express 2012

Introduction to Visual Studio Express 2012
  • Visual Basic Express 2012 is almost similar to Visual Basic Express 2010 & 2008, but it has added many new features.
  • Visual Basic Express 2012 no more comes as a stand-alone program, it is now integrating with other Microsoft Programming languages C# and also C++ in a package called visual Studio 2012.

(Introduction To Visual Basic Application Development)

.NET Framework Architecture

.NET Framework Architecture
  • The .NET Framework is Microsoft’s new platform for the development and implementation of applications program.
  • Simply, .NET is a new framework for developing web-based and also windows-based applications within the Microsoft environment.
  • Microsoft and other publishers of development tools realized that they could write the code needed to perform a variety of commonly needed tasks and also make this functionality available to the programmer in an easy-to-use form.
  • So, the framework did all the work behind the scenes, serving as an interface between the program and the operating system.
  • Two main parts of the .NET framework are:
    • Common Language Runtime.
    • .NET framework classes/ libraries.

Common Language Runtime (CLR)

Common Language Run time (CLR)

CLR is considering as the heart of .NET. It also provides a “runtime environment” for the execution of code written in any .NET Language.

  • Features :
    • Common type system
    • Common metadata
    • Intermediate Language (IL) to native code compilers
    • Code execution and security
  • Additional services :
    • Memory Management
    • Thread Management
    • Garbage Handling
    • Exception Handling
  • Much of the functionality available to the VB .NET programmer is provided by the .NET Class Framework.
  • This is a rich set of classes, interfaces, and also structures that provides support for data storage, access to system services, input/output, security and a whole host of other things that the programmer needs.
  • The class framework is arranged hierarchically using the concept of namespaces.
  • A namespace is nothing more than an identifier that is used to group related items together.
  • The root namespace contains classes for all of the base data types (Integer, Char, Array and so on) as well as for the Object type that is the base for all .NET components.
  • Applications that can make use of .net class library:
    • Windows applications
    • Console applications
    • Web applications
    • XML web applications/services
    • Windows services

Elements of a Visual Basic Application

From a programming viewpoint, Visual Basic is an object-oriented that consists of two fundamental parts.

A visual part and a language part

  • The visual part of the language consists of a set of objects, while the language part consists of a high-level procedural programming language.
  • These two elements of the language are using together to create applications.
  • Thus, for our purposes, we can express the elements of a visual basic application as:
A visual part and a language part

(Introduction To Visual Basic Application Development)

The Visual Element

  • From a user’s standpoint, the visual part of an application is provided within a window. This is the graphical interface that allows the user to see the input and also output provided by the application.
  • This user interfaces referred to as the graphical user interface (GUI).
  • From a programmer’s perspective, the GUI is constructed by placing a set of visual objects on a blank window, or form, when the program is being developed.
The Visual Element
  • The programmer can place various objects on this form, which is itself a Visual Basic object.
  • When an application is run, the form becomes a window that provides the background for the various objects placed on the form by the programmer.
  • The standard object Tool-box contains the objects we will use in constructing each graphical user interface.
The Visual Element (contd…)

Fundamental Object Types and their Uses

Fundamental Object Types and their Uses Introduction To Visual Basic Application Development

Creating a Visual Basic program

  • To create a Visual basic program you will need the following three windows:
    • Toolbox window for selecting objects
    • Form window for placing objects
    • The properties window for altering an object’s properties

Additionally, the Solution Explorer window should be visible when you begin.

  • Once the design windows are visible, creating a Visual Basic application requires the following three steps:
    • Create the graphical user interface
    • Set the properties of each object on the interface
    • Write the code

Setting an Object’s Properties

  • All objects on a form have properties, which define where on the form the object will appear. The color of the object, its size, and also various other attributes.
  • The properties window allows properties to be listed in alphabetic order, by property name or by property category, By default, also the properties are sorted by category.
  • The two columns within the properties window are where individual object properties are identified.
    • The column on the left is the properties list, which provides the names of the properties of the object also named in the object box.
    • The column to the right is the settings list, which provides the current value assigned to the property also on the left.
    • The currently selected property is the one that is highlighted.

(Introduction To Visual Basic Application Development)

The Properties Window

Introduction To Visual Basic Application Development

Basic Concepts in Introduction To Visual Basic Application Development

The Name Property:

  • The names that are allowed for all objects are also used to name other elements in the Visual Basic programming language and are collectively referred to as identifiers. Identifiers can be made up of any combination of letters, digits or underscores( _ ) selected according to the following rules:
    1. The first character of an identifier must be a letter.
    2. Only letters, digits or underscores may follow the initial letter (Blank spaces, special characters, and also punctuation marks are not allowed)
    3. An identifier can be no longer than 1016 characters
    4. An identifier cannot be a keyword.

Running an Application:

  • At any time during program development, you can run your program using one of the following three methods:
    1. Select the Debug Menu and Click Start
    2. Press the F5 function key
    3. Use the hotkey Alt + D, then press the S key.

Saving a Project:

  • Click the File menu and then click Save All.
    • At this point, all the forms, code modules, and ancillary files will be saved in a folder. Also, the name of the folder will be the project name.


  • Click ” SaveAll ” icon in the Standard Toolbar.
    • Also, It recommends you save your solution to prevent accidental loss of work.

Adding an Event Procedure

  • In a well-designed program, each procedure will consist of a set of instructions necessary to complete and also a well-defined task.
  • Although a procedure that is executed when an event occurs is referred to as an event procedure or event handler.
  • The following slide illustrated The general structure of an event procedure:
Introduction To Visual Basic Application Development
Introduction To Visual Basic Application Development

Write two simple event procedures for action while a form loading in the execution of VB .NET

Example 1:

execution of VB .NET

Example 2:

execution of VB .NET
  • The first line of a procedure is always and also a header line.
  • A header line begins with the optional keyword Private and must contain the keyword Sub (which derives from the word Subprogram), the name of the procedure and also a set of parentheses.
  • For event procedures, the name consists of
    • an object identification,
    • an optional underscore character ( _ ),
    • a valid event for the object,
    • the parameters in parentheses,
    • the keyword Handles followed by the object identification,
    • an underscore character &
    • a valid event.
  • Event procedure templates need not be manually typed because they are automatically provided in the visual Basic Code window.
  • Before activating the code window, we need to decide what Visual Basic statements will be included in the body of our event procedure. (Introduction To Visual Basic Application Development)

Find some additional features of VB .NET compared to VB

For the Visual Application Development (Theory) lesson, click here. also, you can refer more in here.

Visual Application Development (Theory)

Learning Objectives in Visual Application Development

  • To provide an introduction to the fundamentals of programming.
  • Enable students to build simple and also graphical applications to address the problems they face in academic and business settings.
  • Enhance analysis, design, development, troubleshooting, and critical thinking skills.

(Visual Application Development)


Software Processes

  • When we provide a service or create a product we always follow a sequence of steps to accomplish a set of tasks.
  • We can think of a series of structured activities as a process.
  • Any process that has the following characteristics,
    • prescribes all of the major activities.
    • uses resources and produces intermediate and final products.
    • organized to include sub-processes & activities in a sequence.
    • Constrains or control may apply to activities (Budget control and also the availability of resources).
  • When the process involves the building of some product we refer to the process as a life cycle. (Visual Application Development)

Introduction to SDLC

  • The Software Development Life Cycle is the process, involving multiple stages also used to convert a management need into an application system, which is custom developed or purchased, or is a combination of both. (Visual Application Development)
  • SDLC is . . .
    • A model of a detailed plan on how to create, develop, implement and also deliver software.
    • A complete plan outlining how the software will be born and also raised and turned over to its eventual user.

Basic Pattern of General Life Cycle Models

Basic Pattern of General Life Cycle Models
Basic Pattern of General Life Cycle Models

Each phase produces output (deliverables) that will be the input to the next phase. So, a software process model is an abstract representation of a process. (Visual Application Development)

Types of SDLC

Sequential Development
Sequential Development
Iterative Development
Iterative Development

Sequential Development

Sequential Development
  • A development strategy wherein a strict set of development phases or stages followed in sequential or linear order.
  • Only when one phase or stage is completed can development move on to the succeeding phase or stage.
  • Also Sometimes referred to as a classical or traditional method of software development.

(Visual Application Development)

Iterative Development

Iterative Development
  • Iterative development is a strategy for scheduling a certain amount of time for rework or revisions in order to improve the quality of the different parts of the system being built.
  • It doesn’t start with a full specification of requirements.
  • Instead, development begins by specifying and implementing just part of the software, which can review in order to identify further requirements.

(Visual Application Development)

Flowchart for Iterative Development

Flowchart for Iterative Development

SDLC Models

  • Waterfall Model
  • Spiral Model
  • Rapid Application Development
  • V Model
  • Agile Model

Waterfall Model

Waterfall Model
  • Executed the Phases in sequential order
  • Completed Each phase before proceeding to the next.
  • Customer Can’t see Software until the end of the project.
  • It provides a structured approach.

Advantages of the Waterfall Model

  • Relatively simple to understand.
  • Give importance to documentation.
  • Each phase of development proceeds sequentially.
  • Allows managerial control where a schedule with deadlines is set for each stage of development.
  • Helps in controlling schedules, budgets, and also documentation.
  • It provides a structured approach.
  • Generally suited for stable projects.

Disadvantages of Waterfall Model

  • Requirements need to be specified before the development proceeds.
  • Can’t make the changes in requirements in later phases of the waterfall model. This implies that once the software enters the testing phase, it becomes difficult to incorporate changes at such a late phase.
  • No user involvement and working version of the software is available when the software is being developed.
  • It does not involve risk management.
  • Assumes that requirements are stable and are frozen across the project span.

(Visual Application Development)

Spiral Model

Spiral Model
Spiral Model
Spiral Model
  • The iterative model with an emphasis on risk analysis.
  • Aims to combine advantages of top-down and also bottom-up concepts.
  • Good for large and also mission-critical projects.
  • But success highly depends on risk analysis and can be costly.

Phases of the Spiral Model

  1. : Determine objectives and also constraints.
  2. : Assessed the risks and also the activities put in place to reduce the key risks.
  3. : Also Chose the development model for the system.
  4. : Reviewed the Project and also planned the next phase of the spiral.

Problems Addressed…

Problems Addressed
  • With conventional methods,
    • There is a long delay before the customer gets to see any results.
    • Development can take so long that the customer’s business has fundamentally changed by the time the system is ready for use.
    • It is obvious that there is nothing until 100% of the process is finished.

(Visual Application Development)

Rapid Application Development (RAD)

“A software development process that allows usable systems to be built in as little as 60-90 days and also often with some compromises”

“A software development methodology that uses minimal planning in favor of rapid prototyping.”

(Visual Application Development)

RAD Phases

RAD Phases
RAD Phases

A RAD Environment

A RAD Environment

Visual Application Development

For the Visual Application Development (practical) lesson, click here. also, you can refer more theory in here.