Sei sulla pagina 1di 121

Construct the Application Using RAD

The following text has been abstracted from : An Introduction to Rapid Application Development
(RAD) - PDF. The Government of the Hong Kong Special Administrative Region Ref. No. G47a Feb
2002 5-1. This document is strongly recommended as background reading.

What is RAD?

RAD refers to a development life cycle designed to give much faster development and higher quality
systems than the traditional Systems Development Lifecycle (SDLC). It is designed to take advantage
of powerful development software like CASE tools, prototyping tools and code generators. The key
objectives of RAD are: High Speed, High Quality and Low Cost. RAD is a people-centred and
incremental development approach. Active user involvement, as well as collaboration and co-operation
between all stakeholders, is imperative. Testing is integrated throughout the development life cycle so
that the system is tested and reviewed by both developers and users incrementally. A typical RAD life
cycle is composed of the following stages.

Note: If the requirements are obvious, the first two Stages may be combined.

The RAD lifecycle is similar to the traditional Systems Development Lifecycle in some ways. It involves
some of the same steps. However, it is really a compressed version of the traditional approach,
designed to be executed over a very short period of time (for example 3 months).

RAD in SDLC

Mapping between System Development Life Cycle (SDLC) of ITSD and RAD stages is depicted as
follows:
Note: If a combined Feasibility Study (FS)/Systems Analysis & Design (SA&D) is to be conducted, the
Requirements Planning (RP) and User Design (UD) stages will be conducted consecutively. If a SA&D
is to be conducted without a previously conducted FS, the activities in the Requirements Planning (RP)
stage still have to be done when necessary, before starting UD stage.

Essential ingredients of RAD

RAD has four essential ingredients:

Tools

Methodology

People

Management

If any one of these ingredients is inadequate, development will not be high speed.
Tools

The use of powerful CASE tools will provide automation support for systems development through
features such as code generation and automatic consistency checking. CASE tools that generate
prototypes can be used to support an iterative development approach such as RAD, allowing end users
to see the application evolve as it is being built.

Case tools

Methodology

The most effective family of techniques must be formalised and used to deliver the system. A
complete list of tasks is provided to ensure that no essential activity is overlooked, while techniques
are fully documented to ensure that a task is performed in the proper way.

People

The best people must be well-trained in both the methodology and the tools. Small teams that work
consistently well together should be grouped together on assignments.

Management

The project must be managed for speed through the use of techniques such as facilitated Joint
Requirements Planning (JRP) and Joint Application Design (JAD) workshops to extract users'
requirements quickly. Timebox Management is used in Rapid Construction to iteratively deliver the
system to the users.

JRP
JAD

Benefits of RAD

The following benefits can be realised in using RAD:

High quality systems will be delivered because of methodology, tools and user involvement

Business benefits can be realised earlier

Capacity will be utilised to meet a specific and urgent business need

Standards and consistency can be enforced through the use of CASE tools

Build what users need

Correct the software and/or misconceptions as they arise

Shift the design to accommodate new needs and other changes

Resolve bugs early on

In the long run, we will also achieve:

A reduction in the time required to get systems developed

Increased productivity of developers

RAD structural model overview

Structure Component

The structure of RAD is divided into Stages. Each Stage consists of a number of tasks. The following
diagram is a structural model of how RAD tasks are organised:
For each Task, the Structural Model defines clearly the objectives, inputs, outputs, techniques to be
used, roles involved and a list of sub-tasks to be carried out.

Overview of structure

The following diagram shows the Stages and Tasks in RAD:

[click on image for a larger view]

Abstracted from : An Introduction to Rapid Application Development (RAD) The Government of the
Hong Kong Special Administrative Region Ref. No.: G47a Feb 2002 5-1 Version 1.1

When should you use RAD?

When the system being developed is data entry and data display intensive. RAD is not suitable
for computationally intensive programs

When specifications are loosely defined - because RAD includes methods for quickly capturing
user requirements through JRP and JAD sessions.

When the application program is unique to a business - ie not available off the shelf

What to expect in this resource pack

Theory about RAD


This resource provides an overview of RAD concepts and how you can apply the theory to a real
solution.

Example of RAD

This resource provides a simple example of RAD development using several different tools.

Possible CASE tools or RAD tools

This resource provides links to tools that can be used for Rapid Application Development. The resource
does not recommend the use of specific tools.

What you should not expect from this resource

Guidance in using specific tools

This resource provides links to several tools; some of the links include tutorials, however this resource
does not provide guidance on using tools to develop solutions.

Guidance in implementing specific methodologies and techniques

Only one technique is exampled in this resource, however there are many other techniques and tools
available in the market. The specific technique required to develop a solution will be based on the type
of solution required and the tools used to develop the solution.

An Introduction to RAD

This document aims at introducing briefly to the readers the Rapid Application
Development (RAD) methodology. Information covered in the document includes the
essential aspects of RAD, the RAD task structure, roles involved in a RAD project and
techniques that can be applied. After reading the document, it is expected the readers
will have a general understanding of the methodology.

In short, RAD is a system development life cycle which seeks to deliver system faster and
cheaper but still maintain high quality. A typical RAD life cycle consists of four stages,
namely, the requirements planning stage, the user design stage, the rapid construction
stage and the transition stage. However, to ensure that all RAD benefits can be enjoyed,
the four essential aspects of "Tools", "Methodology", "People" and "Management" should
be present.

"Tools" refer to powerful CASE tools that provide automation support for systems
development. "Methodology" refers a complete list of tasks (like RAD) provided to ensure
that no essential activity is overlooked, while techniques are fully documented to ensure
that a task is performed in the proper way. (In the document, a number of techniques are
briefly introduced including user workshop, facilitation, timebox management, parallel
development, logical data modeling, business process modeling, function decomposition,
interaction analysis, prototyping, cluster analysis, entity state analysis and event
dependency analysis.)
"People" refer to those business and technical people involved in a RAD project. For
business people, they must understand the business processes under study well whereas
technical people must be very experienced in the technical platform chosen. Finally,
regarding "Management", the project must be managed for speed through the use of
techniques such as facilitated user workshops and timebox management.

Rapid application development


From Wikipedia, the free encyclopedia
"RAD tool" and "Rapid Application Development Tool" redirect here. For development tools focused
on making graphical user interfaces, see graphical user interface builder.

Software development process

Core activities

Requirements
Design
Construction
Testing
Debugging
Deployment
Maintenance

Paradigms and models


Software engineering
Waterfall
Cleanroom
Incremental
Spiral
V-Model
Agile

Methodologies and frameworks


Prototyping
RAD
UP
XP
TSP
PSP
DSDM
MSF
Scrum
Kanban
Dual Vee Model
TDD
ATDD
BDD
FDD
DDD
MDD
IID
Lean
DevOps

Supporting disciplines
Configuration management
Infrastructure as Code
Documentation
Software quality assurance (SQA)
Project management
User experience
WinOps

Tools
Compiler
Debugger
Profiler
GUI designer
Modeling
IDE
Build automation
Release automation
Testing

Standards and BOKs


CMMI
IEEE standards
ISO 9001
ISO/IEC standards
SWEBOK
PMBOK
BABOK

v
t
e

Rapid application development (RAD) is both a general term used to refer to alternatives to the
conventional waterfall model of software development as well as the name for James Martin's
approach to rapid development. In general, RAD approaches to software development put less
emphasis on planning and more emphasis on process. In contrast to the waterfall model, which calls
for rigorously defined specification to be established prior to entering the development phase, RAD
approaches emphasize adaptability and the necessity of adjusting requirements in response to
knowledge gained as the project progresses. Prototypes are often used in addition to or sometimes
even in place of design specifications.
RAD is especially well suited for (although not limited to) developing software that is driven by user
interface requirements. Graphical user interface builders are often called rapid application
development tools. Other approaches to rapid development include Agile methods and the spiral
model.

Contents
[hide]

1History

2The James Martin RAD method

3Pros and cons of rapid application development

4References

5Further reading

History[edit]
Rapid application development is a response to processes developed in the 1970s and 1980s, such
as the Structured Systems Analysis and Design Method and other Waterfall models. One of the
problems with these methods is that they were based on a traditional engineering model used to
design and build things like bridges and buildings. Software is an inherently different kind of artifact.
Software can radically change the entire process used to solve a problem. As a result, knowledge
gained from the development process itself can feed back to the requirements and design of the
solution.[1] The waterfall solution to this was to try and rigidly define the requirements and the plan to
implement them and have a process that discouraged changes to either. The new RAD approaches
on the other hand recognized that software development was a knowledge intensive process and
sought to develop flexible processes that could take advantage of knowledge gained over the life of
the project and use that knowledge to reinvent the solution.
The first such RAD alternative was developed by Barry Boehm and was known as the spiral model.
Boehm and other subsequent RAD approaches emphasized developing prototypes as well as or
instead of rigorous design specifications. Prototypes had several advantages over traditional
specifications:

Risk reduction. A prototype could test some of the most difficult potential parts of the system
early on in the life-cycle. This can provide valuable information as to the feasibility of a design
and can prevent the team from pursuing solutions that turn out to be too complex or time
consuming to implement. This benefit of finding problems earlier in the life-cycle rather than later
was a key benefit of the RAD approach. The earlier a problem can be found the cheaper it is to
address.

Users are better at using and reacting than at creating specifications. In the waterfall model it
was common for a user to sign off on a set of requirements but then when presented with an
implemented system to suddenly realize that a given design lacked some critical features or was
too complex. In general most users give much more useful feedback when they can experience
a prototype of the running system rather than abstractly define what that system should be.

Prototypes can be usable and can evolve into the completed product. One approach used in
some RAD methods was to build the system as a series of prototypes that evolve from minimal
functionality to moderately useful to the final completed system. The advantage of this besides
the two advantages above was that the users could get useful business functionality much
earlier in the process.[2]
Starting with the ideas of Barry Boehm and others, James Martin developed the rapid application
development approach during the 1980s at IBM and finally formalized it by publishing a book in
1991, Rapid Application Development. This has resulted in some confusion over the term RAD even
among IT professionals. It is important to distinguish between RAD as a general alternative to the
waterfall model and RAD as the specific method created by Martin. The Martin method was tailored
toward knowledge intensive and UI intensive business systems.
These ideas were further developed and improved upon by RAD pioneers like James Kerr and
Richard Hunter, who together wrote the seminal book on the subject, Inside RAD, [3] which followed
the journey of a RAD project manager as he drove and refined the RAD Methodology in real-time on
an actual RAD project. These practitioners, and those like them, helped RAD gain popularity as an
alternative to traditional systems project life cycle approaches.
The RAD approach also matured during the period of peak interest in business re-engineering. The
idea of business process re-engineering was to radically rethink core business processes such as
sales and customer support with the new capabilities of Information Technology in mind. RAD was
often an essential part of larger business re engineering programs. The rapid prototyping approach
of RAD was a key tool to help users and analysts "think out of the box" about innovative ways that
technology might radically reinvent a core business process.[4][5]

The James Martin RAD method[edit]


Phases in the James Martin approach to RAD

The James Martin approach to RAD divides the process into four distinct phases:

1. Requirements planning phase combines elements of the system planning and systems
analysis phases of the Systems Development Life Cycle (SDLC). Users, managers, and IT
staff members discuss and agree on business needs, project scope, constraints, and system
requirements. It ends when the team agrees on the key issues and obtains management
authorization to continue.

2. User design phase during this phase, users interact with systems analysts and develop
models and prototypes that represent all system processes, inputs, and outputs. The RAD
groups or subgroups typically use a combination of Joint Application Development (JAD)
techniques and CASE tools to translate user needs into working models. User Design is a
continuous interactive process that allows users to understand, modify, and eventually
approve a working model of the system that meets their needs.

3. Construction phase focuses on program and application development task similar to the
SDLC. In RAD, however, users continue to participate and can still suggest changes or
improvements as actual screens or reports are developed. Its tasks are programming and
application development, coding, unit-integration and system testing.

4. Cutover phase resembles the final tasks in the SDLC implementation phase, including
data conversion, testing, changeover to the new system, and user training. Compared with
traditional methods, the entire process is compressed. As a result, the new system is built,
delivered, and placed in operation much sooner.[6]

Pros and cons of rapid application development [edit]


In modern Information Technology environments, many systems are now built using some degree of
Rapid Application Development[7] (not necessarily the James Martin approach). In addition to Martin's
method, Agile methods and the Rational Unified Process are often used for RAD development.
The advantages of RAD include:

Better quality. By having users interact with evolving prototypes the business functionality
from a RAD project can often be much higher than that achieved via a waterfall model. The
software can be more usable and has a better chance to focus on business problems that are
critical to end users rather than technical problems of interest to developers.
Risk control. Although much of the literature on RAD focuses on speed and user involvement
a critical feature of RAD done correctly is risk mitigation. It's worth remembering that Boehm
initially characterized the spiral model as a risk based approach. A RAD approach can focus in
early on the key risk factors and adjust to them based on empirical evidence collected in the
early part of the process. E.g., the complexity of prototyping some of the most complex parts of
the system.

More projects completed on time and within budget. By focusing on the development of
incremental units the chances for catastrophic failures that have dogged large waterfall projects
is reduced. In the Waterfall model it was common to come to a realization after six months or
more of analysis and development that required a radical rethinking of the entire system. With
RAD this kind of information can be discovered and acted upon earlier in the process. [2][8]
The disadvantages of RAD include:

The risk of a new approach. For most IT shops RAD was a new approach that required
experienced professionals to rethink the way they worked. Humans are virtually always averse
to change and any project undertaken with new tools or methods will be more likely to fail the
first time simply due to the requirement for the team to learn.

Requires time of scarce resources. One thing virtually all approaches to RAD have in
common is that there is much more interaction throughout the entire life-cycle between users
and developers. In the waterfall model, users would define requirements and then mostly go
away as developers created the system. In RAD users are involved from the beginning and
through virtually the entire project. This requires that the business is willing to invest the time of
application domain experts. The paradox is that the better the expert, the more they are familiar
with their domain, the more they are required to actually run the business and it may be difficult
to convince their supervisors to invest their time. Without such commitments RAD projects will
not succeed.

Less control. One of the advantages of RAD is that it provides a flexible adaptable process.
The ideal is to be able to adapt quickly to both problems and opportunities. There is an inevitable
trade-off between flexibility and control, more of one means less of the other. If a project
(e.g. life-critical software) values control more than agility RAD is not appropriate.

Poor design. The focus on prototypes can be taken too far in some cases resulting in a "hack
and test" methodology where developers are constantly making minor changes to individual
components and ignoring system architecture issues that could result in a better overall design.
This can especially be an issue for methodologies such as Martin's that focus so heavily on the
user interface of the system.[9]

Lack of scalability. RAD typically focuses on small to medium-sized project teams. The other
issues cited above (less design and control) present special challenges when using a RAD
approach for very large scale systems.[10][11][12]

Rapid Application Development (RAD) Model and its Advantages and


Disadvantages of RAD Model
BY DINESH THAKUR

The rapid application development model emphasizes on delivering projects in small


pieces. If the project is large, it is divided into a series of smaller projects. Each of these
smaller projects is planned and delivered individually. Thus, with a series of smaller
projects, the final project is delivered quickly and in a less structured manner. The
major characteristic of the RAD model is that it focuses on the reuse of code, processes,
templates, and tools.

The phases of RAD model are listed below.

1. Planning: Inthis phase, the tasks and activities are planned. The derivables
produced from this phase are project definition, project management procedures, and a
work plan. Project definition determines and describes the project to be
developed. Project management procedure describes processes for managing
issues, scope, risk, communication, quality, and so on. Work plan describes the
activities required for completing the project.
2. Analysis: The requirements are gathered at a high level instead of at the precise
set of detailed requirements level. Incase the user changes the requirements, RAD
allows changing these requirements over a period of time. This phase determines plans
for testing, training and implementation processes. Generally, the RAD projects are
small in size, due to which high-level strategy documents are avoided.
3. Prototyping: The requirements defined in the analysis phase are used to
develop a prototype of the application. A final system is then developed with the help of
the prototype. For this, it is essential to make decisions regarding technology and the
tools required to develop the final system.
4. Repeat analysis and prototyping as necessary: When the prototype is
developed, it is sent to the user for evaluating its functioning. After the modified
requirements are available, the prototype is updated according to the new set of
requirements and is again sent to the user for analysis.
5. Conclusion of prototyping: As a prototype is an iterative process, the project
manager and user agree on a fixed number of processes. Ideally, three iterations are
considered. After the third iteration, additional tasks for developing the software are
performed and then tested. Last of all, the tested software is implemented.
6. Implementation: The developed software, which is fully functioning, is
deployed at the user's end.
Various advantages and disadvantages associated with the RAD model are listed in
Table.
Table Advantages and Disadvantages of RAD Model

Advantages Disadvantages
1. Deliverables are easier to 1. Useful for only larger projects
transfer as high-level abstractions, 2. RAD projects fail if there is no
scripts, and intermediate codes are commitment by the developers or the
used. users to get software completed on
2. Provides greater flexibility as time.
redesign is done according to the 3. Not appropriate when technical
developer. risks are high. This occurs when the
3. Results in reduction of manual new application utilizes new technology
coding due to code generators and code or when new software requires a high
reuse. degree of interoperability with existing
4. Encourages user involvement. system.
5. Possibility of lesser defects due
4. As the interests of users and
to prototyping in nature. developers can diverge from single
iteration to next, requirements may not
converge in RAD model.

PdfObjectProperties Properties
The PdfObjectProperties Class exposes the following properties.

Properties

Changes made to these properties will not affect the object represented by a PdfObject Class until
the setProperties Method is called with this object as a parameter.

Name Description Property Type Supported Objects

author Represents the String MarkupAnnotations


annotation author. If (TextAnnotation,
empty, "RAD PDF" is HighlightAnnotation,
used. etc)

border Represents the form PdfBorder Class ButtonField, CheckField,


field, shape or ComboField, ListField,
annotation's border RadioField, TextField,
characteristics. This EllipseShape,
property can only be RectangleShape,
set if the isLocked CircleAnnotation,
Method returns SquareAnnotation
false.

changeable Indicates whether Boolean All


the object value can
be changed
(although flags may
override this).

checked Indicates whether String CheckField, RadioField


the form field is
checked.

color Represents the color String (Representing a color in CaretAnnotation,


of a check or hexadecimal format, e.g. #000000) CheckShape,
annotation object. HighlightAnnotation,
This property can StrikeoutAnnotation,
only be set if UnderlineAnnotation
the isLocked
Method returns
false.

comb Indicates whether or Boolean TextField


not the text form
field object is a
comb field. (This
value corresponds to
the "Multiline" flag.)
This property can
only be set if
the isLocked
Method returns
false.

contents Represents the String MarkupAnnotations


annotation contents. (TextAnnotation,
HighlightAnnotation,
etc)

creationDate Represents the Date MarkupAnnotations


annotation's (TextAnnotation,
creation date. HighlightAnnotation,
etc)

customData Represents custom String All


data associated with
this object.

deletable Indicates whether Boolean All


the object can be
deleted.

duplicatable Indicates whether Boolean All


the object can be
duplicated in the
GUI.

destinationPage Represents the Integer PdfLinkAnnotation


destination page of
this link, if the
destinationType is
Page. This property
can only be set if
the isLocked
Method returns
false.

destinationType Represents the type PdfLinkAnnotationDestinationType PdfLinkAnnotation


of link which this
class represents. This
property is read-
only. To change the
destination type,
simply assign a new
destination page or
URL.

destinationUrl Represents the String PdfLinkAnnotation


destination URL of
this link, if the
destinationType is
Url. This property
can only be set if
the isLocked
Method returns
false.

doNotScroll Indicates whether or Boolean TextField


not the text form
field object should
not scroll and
instead restrict input
once full. (This value
corresponds to the
"DoNotScroll" flag.)
This property can
only be set if
the isLocked
Method returns
false.

edit Indicates whether or Boolean ComboField


not the combo
(drop-down) form
field object should
allow custom input.
(This value
corresponds to the
"Edit" flag.) This
property can only be
set if the isLocked
Method returns
false.

exportValue Represents the String CheckField, RadioField


export value of this
check or radio form
field when checked.
This property can
only be set if
the isLocked
Method returns
false.

fillColor Represents the fill String (Representing a color in ButtonField, CheckField,


color of a form field, hexadecimal format, e.g. #000000) ComboField, ListField,
shape, or annotation RadioField, TextField,
object. This property EllipseShape,
can only be set if RectangleShape,
the isLocked CircleAnnotation,
Method returns SquareAnnotation
false.

font Represents the text PdfFont Class ButtonField, CheckField,


or form field object's ComboField, ListField,
font characteristics. RadioField, TextField,
The font color is TextShape
used to represent
check marks for
CheckField and
RadioField objects
when checked is
true. This property
can only be set if
the isLocked
Method returns
false.

height Represents the Integer All


object height in
pixels on the page.
This property can
only be set if
the isLocked
Method returns
false.

hideFocusOutline Indicates whether Boolean All


the object's dotted
focus outline is
shown when the
object is selected.

hideHighlight Indicates whether Boolean All


the object's
highlight (if the
object type supports
highlighting) is
shown.

highlightColor Represents the color String CheckField,


which should be ComboField, ListField,
used to highlight the RadioField, TextField
object (if
highlighting is
enabled). This
property can be set
to null to indicate
that RAD PDF's
default should be
used.

isReset Indicates whether Boolean ButtonField


this field resets the
form when clicked.

isSubmit Indicates whether Boolean ButtonField


this field submits the
form when clicked.

label Text label to display String ButtonField


centered on a
button.

left Represents the Integer All


object position in
pixels on the page
from the left edge.
This property can
only be set if
the isLocked
Method returns
false.

lineColor Represents the color String (Representing a color in LineShape,


of a line object. hexadecimal format, e.g. #000000) ArrowShape, InkShape

lineWidth Represents the Integer LineShape,


width of a line object ArrowShape, InkShape
in pixels.

lockProportions Indicates whether Boolean All


the object
proportions can be
changed when
resized.

maxLength Represents the Integer TextField


maximum number of
characters allowed in
the text form field
object. A value of 0
indicates that any
number of
characters can be
entered. This
property can only be
set if the isLocked
Method returns
false.

moveable Indicates whether Boolean All


the object can be
moved. This
property can only be
set if the isLocked
Method returns
false.

multiline Indicates whether or Boolean TextField


not the text form
field object can
contain multiple
lines of text. (This
value corresponds to
the "Multiline" flag.)
This property can
only be set if
the isLocked
Method returns
false.

multiSelect Indicates whether or Boolean ListField


not the list form
field object can have
multiple objects
selected at the same
time. (This value
corresponds to the
"MultiSelect" flag.)
This property can
only be set if
the isLocked
Method returns
false.

name Represents the form String ButtonField, CheckField,


field name. This ComboField, ListField,
property can only be RadioField, TextField
set if the isLocked
Method returns
false.

opacity Represents the Integer PdfArrowShape,


opacity of this object PdfCheckShape,
(in percent, from 0 PdfEllipseShape,
to 100, inclusive). PdfImageShape,
PdfInkShape,
PdfLineShape,
PdfRectangleShape,
PdfTextShape,
PdfWhiteoutShape

open Indicates whether or Boolean MarkupAnnotations


not the markup (TextAnnotation,
annotation's popup HighlightAnnotation,
is open. etc), PopupAnnotation
(readonly)

readOnly Indicates whether or Boolean ButtonField, CheckField,


not the form field ComboField, ListField,
object is read only. RadioField,
(This value SignatureField,
corresponds to the TextField
"ReadOnly" flag.)
This property can
only be set if
the isLocked
Method returns
false.

resizable Indicates whether Boolean All


the object can be
resized. This
property can only be
set if the isLocked
Method returns
false.

required Indicates whether or Boolean ComboField,


not the form field RadioField,
object is a required SignatureField,
field. (This value TextField
corresponds to the
"Required" flag.) This
property can only be
set if the isLocked
Method returns
false.

sort Indicates whether or Boolean ComboField, ListField


not the form field
object's list of
options are sorted.
(This value
corresponds to the
"Sort" flag.) This
property can only be
set if the isLocked
Method returns
false.

stylable Indicates whether Boolean All


the object can be
styled (e.g. font or
color changed). This
property can only be
set if the isLocked
Method returns
false.

subject Represents the String MarkupAnnotations


annotation subject. (TextAnnotation,
HighlightAnnotation,
etc)

text Represents the String TextShape


object text.

tooltip Represents the String ButtonField, CheckField,


tooltip text which ComboField, ListField,
will be shown when RadioField,
the mouse hovers SignatureField,
over this form field TextField
object. This property
can only be set if
the isLocked
Method returns
false.

top Represents the Integer All


object position in
pixels on the page
from the top edge.
This property can
only be set if
the isLocked
Method returns
false.

value Represents the form String ComboField, ListField,


field value. The TextField
values in a multi-
select list field are
seperated by the
new line character.

visible Indicates whether Boolean All


the object is visible
(although flags may
override this).

width Represents the Integer All


object width in
pixels on the page.
This property can
only be set if
the isLocked
Method returns
false.

What is RAD Model? Advantages &


Disadvantages
What is RAD (Rapid Application Development) Model?
RAD or Rapid Application Development process is an adoption of the waterfall
model; it targets at developing software in a short span of time. RAD follow the
iterative

RAD model has following phases

Business Modeling

Data Modeling

Process Modeling

Application Generation

Testing and Turnover


It focuses on input-output source and destination of the information. It emphasizes
on delivering projects in small pieces; the larger projects are divided into a series of
smaller projects. The main features of RAD model are that it focuses on the reuse of
templates, tools, processes and code.

Different phases of RAD model includes


Phases of RAD Activities performed in RAD Model
model

Business
Modeling On basis of flow of information and distribution between various
business channels, the product is designed

Data Modeling
The information collected from business modeling is refined into a
set of data objects that are significant for the business

Process
Modeling The data object that is declared in the data modeling phase is
transformed to achieve the information flow necessary to
implement a business function

Application
Generation Automated tools are used for the construction of the software, to
convert process and data models into prototypes

Testing and
Turnover As prototypes are individually tested during every iteration, the
overall testing time is reduced in RAD.

When to use RAD model


:

When system needs to be produced in a short span of time (2-3 months)

When the requirements are known

When the user will be involved all through the life cycle

When technical risk is less


When there is a necessity to create a system that can be modularized in 2-3
months of time

When budget is high enough to afford designers for modeling along with the
cost of automated tools for code generation

Advantages and Disadvantages of RAD


Advantages Disadvantages

Flexible and adaptable to changes It can't be used for smaller projects

It is useful when you have to reduce Not all application is compatible with
the overall project risk RAD

It is adaptable and flexible to changes When technical risk is high, it is not


suitable

It is easier to transfer deliverables as If developers are not committed to


scripts, high-level abstractions and delivering software on time, RAD
intermediate codes are used projects can fail

Due to code generators and code Reduced features due to time boxing,
reuse, there is a reduction of manual where features are pushed to later
coding version to finish a release in short
period

Due to prototyping in nature, there is a Reduced scalability occurs because an


possibility of lesser defects RAD developed application begins as
a prototype and evolves into a finished
application
Each phase in RAD delivers highest Progress and problems accustomed
priority functionality to client are hard to track as such there is no
documentation to demonstrate what
has been done

With less people, productivity can be Requires highly skilled designers or


increased in short time developers

SDLC: SDLC models Advantages & disadvantages


October 20, 2008

Post a Comment

SDLC models Advantages & disadvantages

Advantages of Waterfall Model


1. Clear project objectives.
2. Stable project requirements.
3. Progress of system is measurable.
4. Strict sign-off requirements.

Disadvantages of Waterfall Model

1. Time consuming
2. Never backward (Traditional)
3. Little room for iteration
4. Difficulty responding to changes

Advantages of Spiral Model

1. Avoidance of Risk is enhanced.


2. Strong approval and documentation control.
3. Implementation has priority over functionality.
4. Additional Functionality can be added at a later date.

Disadvantages of Spiral Model


1. Highly customized limiting re-usability
2. Applied differently for each application
3. Risk of not meeting budget or schedule
4. Possibility to end up implemented as the Waterfall framework

Advantages of Prototype model

1. Strong Dialogue between users and developers


2. Missing functionality can be identified easily
3. Confusing or difficult functions can be identified
4. Requirements validation, Quick implementation of, incomplete, but
functional, application
5. May generate specifications for a production application
6. Environment to resolve unclear objectives
7. Encourages innovation and flexible designs

Disadvantages of Prototype model

1. Contract may be awarded without rigorous evaluation of Prototype


2. Identifying non-functional elements difficult to document
3. Incomplete application may cause application not to be used as the
full system was designed
4. Incomplete or inadequate problem analysis
5. Client may be unknowledgeable
6. Approval process and requirement is not strict
7. Requirements may frequently change significantly

Prototyping in Systems Analysis

Introduction

Organizations of all types do it. Microsoft, Disney, and Boeing do it. It is known by
several names: simulate, model, prototype. It is a process by which organizations
innovate, better communicate both with their customers and with each other
internally, develop and improve their products. Boeing builds digital prototypes of its
aircraft allowing the detection of design conflicts before the parts are manufactured
and assembled. Disney uses storyboards to work through the process of producing
feature-length films. Microsoft sends out thousands of copies of "beta" versions of its
software and then uses its customers as the testers of its "prototype" [12]. Its a
powerful technique, but what place does it have in systems analysis?

This paper will look at what prototyping is to systems analysis. It will explain some of
the advantages and disadvantages of prototyping and discuss why an organization
might or might not want to consider prototyping. It will discuss who should be
involved in prototyping and how to choose a prototyping approach and a prototyping
tool. This is meant to be an overview of prototyping in systems analysis rather than a
step-by-step guide. Links are provided where more information is available online.

Table of Contents

What is Prototyping?

As mentioned earlier a prototype is like a model or a simulation of a real thing. In


systems analysis a prototype is a model of the system (or subsystem) under analysis
[2]. A system can be anything from the food ordering system at a restaurant to the air
traffic control system of a major airport. Prototypes of these systems can take many
forms. They can be paper-based or computer-based. They can model the entire system
with real data or just a few screens with sample data. Prototyping is the process of
developing prototypes . It is a methodology in its own right and a technique and
supplemental methodology to other methodologies. In this case, we will focus on the
ways in which prototyping is used as a technique and a supplemental methodology to
the systems development life cycle (SDLC).

A survey of MIS managers in Fortune 1000 firms [3] suggests that there are four
prototyping methodologies in use today which supplement the traditional systems
development life cycle:

1. Illustrative: produces only mockups of reports and screens.

2. Simulated: simulates some system functions but does not use real data or a
database, model not implemented.

3. Functional: performs some actual system functions and uses real data and/or a
database, model not implemented.

4. Evolutionary: produces model(s) that become part of the final operational


system.
Others suggest such categorizations as evolutionary versus throw-away [10].
Evolutionary in this case is similar to #4 mentioned above (sometimes known as
operational [8] ). It produces a model that evolves throughout the development of the
system and eventually becomes the final system. Throw-away (sometimes known as
exploratory [8] , or expendable [5]) would encompass the other three methodologies
previously mentioned. A throw-away prototype is just what it sounds like. Once its
purpose is fulfilled it is thrown away.

Another way that prototypes are classified is by the fidelity of the prototype, or the
degree to which the prototype represents the appearance and interaction of the system.
[4] A low-fidelity prototype is one that is quickly constructed to depict concepts, design
alternatives, and screen layouts. Medium-fidelity prototypes partially simulate the system
interaction and functionality. High-fidelity prototypes are fully interactive, simulating much of
the functionality in the final product. The chart below suggests techniques that could be
used at different fidelity levels.
Figure 1: Transition of Prototyping Techniques [4]
for more information on the techniques mentioned in the chart click here

Included in the chart above are terms used to describe other prototyping concepts.
A horizontal prototype models many features with little functionality. While a vertical
prototype models few features, but with great detail in functionality. [8] A scenario
prototype has both very few features and very little functionality. The figure below
illustrates these concepts:

Figure 2: Two Dimensions of Prototyping [4]

Another prototyping concept similar to those just discussed is that of a diagonal prototype.
One that is horizontal down to a certain point and then is vertical beyond that.

One final classification of prototypes is global versus local. A global prototype models the
entire system. It is much like a horizontal prototype, but goes into greater detail. A local
prototype models a single system component. It is much like a vertical prototype that is focused
on only one feature.[8]
As shown here a prototype can be defined by its functionality, features, data, interaction, and
lifespan. There are no doubt more ways to classify and categorize prototypes, but these few
demonstrate how characteristics can vary from one prototype to the next.

Top of Page Table of Contents

Advantages of Prototyping in Systems Analysis

Systems analysis is the requirements determination phase of the systems


development life cycle (SDLC). In this phase developers determine how the current
system functions and what users would like to see in a new system. [7] In Rapid
Development: Taming Wild Software Schedules [10], Steve McConnell states that "A
survey of more than 8000 projects found that the top three reasons that projects were
delivered late, over budget, and with less functionality than desired all had to do with
requirements-management practices: lack of user input, incomplete requirements, and
changing requirements (Standish Group 1994)." Systems development today is any
many ways software development. Just as with software, getting this phase right is
critical to the success of the entire system. The reasons mentioned above for project
shortfalls are really the result of poor communication. Prototyping, when used as a
communication tool between the developers and the users, can help to overcome these
problems.

As a model of the new system a prototype allows for several forms of


communication. First, it allows the developers to communicate to the users their
understanding of the requirements. (Obviously before a prototype can be built there
must be some initial requirements discussions between developers and users). The
initial prototype, whatever form it takes, will automatically reflect the developer's
understanding of those early requirements. After viewing/interacting with the initial
prototype the second form of communication begins. The users give the developers
feedback. Not only will the users correct any misconceptions by the developers, but
they will likely recognize misconceptions or requirements they did not anticipate of
their own. From this point on the process is iterative. Developers will make
corrections and changes to the prototype based on user feedback and the users will
view/interact with the prototype and make changes to the requirements. This
continues until they come to an agreement on the requirements or run out of time or
money or both. At its best this process provides for very rich user input resulting in
well thought out requirements both for the user and the developer.
Improved communication is just one of many benefits that can be realized when
prototyping in the systems analysis phase. Here are some others reported in systems
development literature [13, 8, 11, 6, 10]:

Provides a process to perfect the requirements definition.

Provides a formal specification embodied in an operating replica.

More enthusiastic and constructive end-user, customer participation in


requirements activities.

Improved morale of end-users, customers, and developers.

Greater level of user satisfaction with systems development.

Users better prepared for later stages of development due to familiarity with
prototype.

Delivery of early proof-of-concept.

Prototype may be easily changed and even discarded.

Allows productive work to proceed despite initial uncertainties.

Demonstrates progress at an early stage of development.

May provide early training for future users of the system.

May produce some useful deliverables even if the project runs out of time or money.

Should result in a product that is a better fit for the customer's requirements.

Systems produced through prototyping may be judged easier to learn and easier to use.

Opinions on the cost of prototyping vary. Some feel prototyping can allow for
lower maintenance costs since the prototype is meant for change. While upfront costs
can be high when purchasing special prototyping tools. [8] Others feel that the cost of
prototyping is about the same as traditional requirements gathering. They argue the
tool cost and extra time for building the prototype are offset by the time saved later in
getting the requirements right.
Top of Page Table of Contents

Disadvantages of Prototyping in Systems Analysis

Even though the benefits of prototyping are strong there are disadvantages and
potential risks associated with it. The primary concerns are that of excessive change
requests and "feature creep". Just by the nature of the iterative process users will again
and again request changes. As they reexamine the prototype they may think of new
features they would like that are beyond the scope of the original project. These can
be controlled with proper planning but both are legitimate concerns. Other concerns
include [8, 10, 2]:

Can result in unrealistic schedule and budget expectations.

Iterative nature makes it difficult for management to plan and schedule.

Can bias the system analysis process. If the prototype is computer-based


manual alternatives are unlikely to be considered.

Working prototypes may lead management and customers to believe that the final product
is almost ready for delivery.

People can begin to think of the prototype as the solution.

The excellent (or disappointing) performance characteristics of prototypes may mislead


the customer.

Prototypes generally lack security, auditing, and other controls, and data
integrity may be difficult to ensure.

Often inefficient and difficult to maintain.

Tendency not to document.

Customers may not be prepared to provide the level or frequency of feedback required for
iterative prototyping.

Tying a Sensible Knot [1] is a look at the best practices of New York State local
government information systems projects. In a section on prototyping this guide
summarizes how the NYS Department of Social Services considered "feature creep"
to be a good thing. Click here to download a pdf version of this guide. The article on
prototyping begins on page 68.

Top of Page Table of Contents

Who should be involved in Prototyping?

The primary participants in the prototyping process are the developers and the
users. The developers provide the development and prototyping expertise. The users
provide the systems expertise. As with any project management support is critical
both for the developers and the users. The developers will need support from their
management to acquire the necessary resources for the project. Both developers and
users will need management support to continue the iterative process through to its
conclusion.

In the study described in Toward a Contingency Model for Selecting an


Information System Prototyping Strategy, [5] the authors found that there were five
variables, when combined with prototyping, that affected system success. The first
two variables involved project innovativeness and system impact on the organization.
The remaining three variables involved the developers and users.

The first developer/user variable determined to affect system success when used
with prototyping was developer experience with prototyping. According to the study,
the primary benefit of experience is that the developer is prepared for the frequent
changes in user requirements and for the high level of interpersonal communication
required. Ironically, this study found if developers were already familiar with the
application in development prototyping was of little use because less interaction was
needed to determine requirements.

The remaining two factors which appear to affect system success are the amount of
user participation and the number of users involved in the project. It should come as
no surprise that when higher user participation is combined with prototyping projects
are more likely to succeed. What is critical is that the high user participation comes
from just a few people. A large number of users mixed with prototyping makes the
development process more difficult to manage. Each user has his own ideas about
how the system should work. Processing and implementing the changes of each user
becomes considerably more difficult when a large number of users are involved.

Top of Page Table of Contents


Deciding whether to Prototype or not

Systems development efforts differ in so many ways. Each has its own scope,
requirements, developers, users, management, level of innovativeness, development
time, complexity, organizational culture, etc. While prototyping can be a strong asset
for one project it can turn out to be a burden for another. The key is to use prototyping
wisely. System development experts suggest that prototyping positively affects the
outcome of a system under development in the following situations [2, 9, 5] :

Situation Reason to consider prototyping


Users are uncomfortable with abstract models Gives user something real to interact with
Gives user and developers something to work
*The project will have a long development time
with early on
Allows users to work through the requirements
The requirements are highly uncertain
as the prototype develops
*No comparable system has been previously
Allows for experimentation
developed - high innovation
Reaching a solution calls for simulation, Allows for simulation, experimentation, and
experimentation, or incremental evaluation incremental evaluation
Prototyping tools are generally designed for
A critical system is needed quickly quick implementation. Can begin requirements
gathering quickly.
Users are available Allows for high user participation

Some suggest [13, 2 , 5] considering other options for:

Situation Reason to consider other options


*an existing system requirements are well known
algorithm-driven projects that involve heavy in general prototyping tools are not designed
calculation for this type of project
users are not available many of the advantages of prototyping are lost
managing requests for changes is almost
large number of users
impossible
*small, short-lived projects the prototyping effort can not be justified

*These recommendations are not universal. For example, some argue that the high
number of changes in requirements for a project of long duration justify prototyping.
While others argue that prototyping's lack of manageability make its use questionable
in projects of long duration. Some argue that existing systems projects do not benefit
from prototyping, whiles others argue that when the existing system becomes the
prototype it can be beneficial.[5]

Top of Page Table of Contents

Choosing the Prototyping Approach

Once an organization decides to use prototyping during systems analysis they must
then decide on what kind of prototype they will build. Will they use an evolutionary or
throw-away prototype? Will they use a low, medium or high-fidelity prototype? Will it
demonstrate lots of features with little real functionality as with a horizontal
prototype? Or will it have a lot of functionality in one area with few features as with a
vertical prototype?

Here are some key points to considering when deciding on the most appropriate
approach.[4] The approach solutions suggested here are based on fidelity but the key
points apply to any approach:

Key Points Solution based on fidelity


Cost and schedule If budget and schedule are limited, consider low-fidelity prototyping,
constraints especially paper mock-up, because they are very cheap and fast to
develop. If there are experienced programmers with fast tools to build a
computer-based prototype, medium-fidelity prototyping is also a
consideration.

Navigation and flow Medium-fidelity prototyping is good to simulate the system's interaction.
In low-fidelity prototyping, storyboard can show the system's direction.
User driven or If a user-driven prototype is needed, medium to high-fidelity prototyping
facilitator-driven is recommended because users can directly interact with the prototype.
User-driven prototypes are the type primarily discussed in this paper.
Otherwise, if a facilitator-driven prototype is needed where, for example,
a developer steps through screens while the user looks on, low-fidelity
prototyping is the choice.
Look-and-feel the Medium and high-fidelity prototyping can help users gain the feeling of
product how the product works. If using a low-fidelity prototype, the developer
must be good at facilitating the prototyping process.
Developer This choice is based on the experience level of the developer(s). If the
facilitation developer has experience with prototyping using low-fidelity prototyping
skill/programming this may be the appropriate choice. If the developer has experience with
skill medium to high-fidelity prototyping involving programming it may be the
most appropriate.

Top of Page Table of Contents

Choosing a Prototyping Tool

After deciding on a the prototyping approach the prototyping tool must be selected. The goal is
to fit the tool to the requirements of the system under development, the skills of the developers,
and the needs of the users. Here is a brief list of prototyping tools starting at the top with the less
formal moving down to more formal tools [8, 2]. The links in this list provide one of three
things: either information about general use of the tool, information about prototyping use of the
tool, or an example of the use of the tool with prototyping.

Pencil and paper

Drawing software

Demo makers

Animation and slide-show software such as Microsoft PowerPoint

Screen painters, menu builders, report generators

Perl + Motif + Tcl/Tk (UNIX)

CASE tools such as Oracle Designer

"Visual" RAD tools such as Optima++, Borland Delphi, and Visual Basic

4GLs such as FOCUS Six

UIMSs (User Interface Management Systems) such as WINTERP

Executable specification languages (VDM variants)

The tool of the final system.


Here are a set of features to be aware of when selecting a prototyping tool. They are derived from
a set of requirements for user-interface prototyping [14], but can easily be extended to other parts
of a prototyping project.

Ease of use: good prototyping tools should allow all members to participate in
development and refinement of the prototype. Steep learning curves are unacceptable
because many of the contributors do not have time to learn the tools.

Fast turn-around: in prototyping many small refinements must be made. Tools should
allow developers to quickly make changes and quickly see the results.

Extensive control over prototype features: prototyping tools should be very flexible so
developers can try out new ideas.

Data collection capabilities: for more complex projects an ideal prototyping tool would
be able to capture information about task specifications, system functionality, interface
functionality, screen layouts and behavior, design rationale, user feedback, benchmarks,
reusable code.

Executability: the prototype should be as faithful to the real system as developers require
to increase reliability of information collected.

Lifecycle support: prototyping tools can help with all phases of development even beyond
systems analysis.

Team design: should support groups of people working together either simultaneously or
asynchronously, or remotely if these are required by the project.

Version control: developers may want to explore and evaluate alternative designs. The
prototyping tool should allow for version control if it is required by the situation.

Top of Page Table of Contents

Prototyping within other Methodologies

It should be mentioned that prototyping is not only used as a supplement to the SDLC,
but it is also heavily used in Rapid Application Development (RAD) and Object-
Oriented methodologies.
The promise of RAD is "cheaper, faster, better". [16] It strives to achieve that promise
through [15]:

Gathering requirements using workshops or focus groups

Prototyping and early, reiterative user testing of designs

The re-use of software components

A rigidly paced schedule that defers design improvements to the next product
version

Less formality in reviews and other team communication

Object-Oriented methodologies often use prototyping and are often associated with
RAD. The Information System Consultant's Handbook [2] describes the purpose of
object-oriented analysis as finding and describing the business objects and in
identifying the relationships between the objects via a conceptual model. Prototyping
naturally helps developers and users in finding and describing these business objects
and identifying the relationships by giving them a hands-on tools. One of the primary
advantages reported of object-oriented development is the increase in productivity
because objects and code can be reused. Prototyping and reuse go together because it
is easier to prototype if there is a library of reusable classes.

Top of Page Table of Contents

Conclusion

Prototyping can be a powerful technique in systems analysis. Before deciding to


prototype developers must look at the system under development and consider
whether prototyping is appropriate. They must weigh the potential benefits against the
potential risks. They must consider the people involved in the project, whether they
are experienced prototypers or unenthusiastic users. They must consider the
prototyping approach, whether illustrative, simulated, functional, evolutionary, or
throwaway, vertical, or horizontal, low-fidelity, or high-fidelity, global or local. They
must consider the tools available to them.

Appropriately used in systems analysis, prototyping can lead to improved


communication between developers and users. It can provide a process for defining
the requirements. It can allow productive work to proceed even while uncertainties
remain. It can provide a living specification for the final system. Appropriately used,
prototyping can be the difference between success and failure.

Visual Basic/History
< Visual Basic

Visual Basic is Microsoft's high-level object-oriented rapid application development environment for
the Windows platform. The first versions of Visual Basic were intended to target Windows 3.0 (a
version for DOS existed as well), however it was not until version 3.0 for Windows 3.1 that this
programming language gained large-scale acceptance in the shareware and corporate programming
community.
Using drawing tools that resemble those found in hardcopy page layout programs or PhotoShop, VB
programmers make user interfaces by drawing controls and other UI components onto forms. The
programmer then adds code to respond to user interactions with the controls (for example, clicks,
drag and drop, etc) known as events. The code can trigger events in other controls (for example, by
displaying text or an image), execute procedures (run some algorithm based on the values entered
in some control, output data, do business logic, etc), or almost anything else one might do in code.
Visual Basic can be considered to be an interpreted language like its Basic ancestor, with
appropriate modifications to accommodate object-oriented programming, and has implicit type
conversion. That is, the VB development environment goes to great lengths to format (and aid the
user in formatting) programming code so that it conforms to executable syntax. For example, VB will
appropriately change the case of newly typed variable names to match those that have been
declared previously (if they have been declared at all!). Traditionally, VB is known for compiling
programs into pseudo-code (p-code, similar to Java's byte code) which is interpreted at runtime,
requiring the use of dynamically-linked libraries (for example, VBRUN300.DLL for version 3 of Visual
Basic, circa 1992) but newer versions can compile code into something more closely resembling the
efficient machine code generated by C-like compilers. VB6 can be compile either into p-code or into
native code; in fact VB6 uses the Microsoft C++ compiler to generate the executable.
For new Windows programmers, VB offers the advantage of being able to access much of the
Windows UI functionality without knowing much about how it works by hiding the technical details.
Although accessing low-level Windows UI functionality is possible, doing so in VB is as, or more
difficult compared to such access using Visual C++ or other lower level programming languages.
Recently VB.NET has gone a long way to fixing some of the limitations.
Using custom controls provided by Microsoft or third parties, almost any functionality that is possible
in Windows can be added to a VB program by drawing a custom control onto a form in the project.
Visual Basic traditionally comes in at least entry level and professional versions, with various
designations depending on Microsoft's contemporary marketing strategy. The different versions are
generally differentiated by the number of custom controls included, and the capabilities of the
compiler. Higher priced packages include more functionality.

Evolution of Visual Basic[edit]


VB 1.0 was introduced in 1991. The approach for connecting the programming language to the
graphical user interface is derived from a system called Tripod (sometimes also known as Ruby),
originally developed by Alan Cooper, which was further developed by Cooper and his associates
under contract to Microsoft.
Timeline of Visual Basic[edit]
Visual Basic 1.0 (May 1991) was released for Windows.

Visual Basic 1.0 for DOS was released in September 1992. The language itself was not quite
compatible with Visual Basic for Windows, as it was actually the next version of Microsoft's
DOS-based BASIC compilers, Microsoft QuickBASIC compiler QuickBASIC and BASIC
Professional Development System. The interface was barely graphical, using extended ASCII
characters to simulate the appearance of a GUI.

Visual Basic 2.0 was released in November 1992. The programming environment was easier
to use, and its speed was improved.

Visual Basic 3.0 was released in the summer of 1993 and came in Standard and
Professional versions. VB3 included a database engine that could read and write Access
databases.

Visual Basic 4.0 (August 1995) was the first version that could create 32-bit as well as 16-bit
Windows programs. It also introduced the ability to write classes in Visual Basic.

With version 5.0 (February 1997), Microsoft released Visual Basic exclusively for 32-bit
versions of Windows. Programmers who preferred to write 16-bit programs were able to import
programs written in Visual Basic 4.0 to Visual Basic 5.0, and Visual Basic 5.0 programs can
easily be converted with Visual Basic 4.0. Visual Basic 5.0 also introduced the ability to create
custom user controls, as well as the ability to compile to native Windows executable code,
speeding up runtime code execution.

Visual Basic 6.0 (Mid 1998) improved in a number of areas, including the ability to create
web-based applications using Internet Explorer. Visual Basic 6 is no longer supported.

Function Procedures (Visual Basic)


5/27/2017 3 min to read Contributors

A Function procedure is a series of Visual Basic statements enclosed by


the Function and End Function statements. The Function procedure performs a task
and then returns control to the calling code. When it returns control, it also returns a
value to the calling code.
Each time the procedure is called, its statements run, starting with the first executable
statement after the Function statement and ending with the first End Function , Exit
Function , or Return statement encountered.

You can define a Function procedure in a module, class, or structure. It is Public by


default, which means you can call it from anywhere in your application that has access
to the module, class, or structure in which you defined it.

A Function procedure can take arguments, such as constants, variables, or expressions,


which are passed to it by the calling code.

Declaration Syntax
The syntax for declaring a Function procedure is as follows:
VBCopy

[Modifiers] Function FunctionName [(ParameterList)] As ReturnType


[Statements]
End Function

The modifiers can specify access level and information regarding overloading,
overriding, sharing, and shadowing. For more information, see Function Statement.

You declare each parameter the same way you do for Sub Procedures.

Data Type

Every Function procedure has a data type, just as every variable does. This data type is
specified by the As clause in the Function statement, and it determines the data type
of the value the function returns to the calling code. The following sample declarations
illustrate this.
VBCopy

Function yesterday() As Date


End Function

Function findSqrt(ByVal radicand As Single) As Single


End Function
For more information, see "Parts" in Function Statement.

Returning Values
The value a Function procedure sends back to the calling code is called its return value.
The procedure returns this value in one of two ways:

It uses the Return statement to specify the return value, and returns control
immediately to the calling program. The following example illustrates this.

VBCopy

Function FunctionName [(ParameterList)] As ReturnType


' The following statement immediately transfers control back
' to the calling code and returns the value of Expression.
Return Expression
End Function

It assigns a value to its own function name in one or more statements of the
procedure. Control does not return to the calling program until an Exit
Function or End Function statement is executed. The following example illustrates
this.

VBCopy

Function FunctionName [(ParameterList)] As ReturnType


' The following statement does not transfer control back to the calling code.
FunctionName = Expression
' When control returns to the calling code, Expression is the return value.
End Function

The advantage of assigning the return value to the function name is that control does
not return from the procedure until it encounters an Exit Function or End
Function statement. This allows you to assign a preliminary value and adjust it later if
necessary.

For more information about returning values, see Function Statement. For information
about returning arrays, see Arrays.

Calling Syntax
You invoke a Function procedure by including its name and arguments either on the
right side of an assignment statement or in an expression. You must provide values for
all arguments that are not optional, and you must enclose the argument list in
parentheses. If no arguments are supplied, you can optionally omit the parentheses.

The syntax for a call to a Function procedure is as follows:

lvalue = functionname [( argumentlist )]

If (( functionname [( argumentlist )] / 3) <= expression ) Then

When you call a Function procedure, you do not have to use its return value. If you do
not, all the actions of the function are performed, but the return value is
ignored. MsgBox is often called in this manner.

Illustration of Declaration and Call

The following Function procedure calculates the longest side, or hypotenuse, of a right
triangle, given the values for the other two sides.
VBCopy

Function hypotenuse(ByVal side1 As Single, ByVal side2 As Single) As Single


Return Math.Sqrt((side1 ^ 2) + (side2 ^ 2))
End Function

The following example shows a typical call to hypotenuse .


VBCopy

Dim testLength, testHypotenuse As Single


testHypotenuse = hypotenuse(testLength, 10.7)

Visual Basic
From Wikipedia, the free encyclopedia
This article is about the Visual Basic language shipping with Microsoft Visual Studio 6.0 or earlier.
For the Visual Basic language shipping with Microsoft Visual Studio .NET or later, see Visual
Basic .NET.

Some of this article's listed sources may not be reliable. Please help this article
by looking for better, more reliable sources. Unreliable citations may be
challenged or deleted. (April 2014) (Learn how and when to remove this template message)

Visual Basic
Paradigm Object-based and Event-driven

Developer Microsoft

First appeared 1991; 26 years ago

Stable release 6.0 / 1998; 19 years ago

Typing discipline Static, strong

OS Microsoft Windows and MS-DOS

Website msdn.microsoft.com/en-us/vstudio/ms788229.aspx

Major implementations

Microsoft Visual Studio


Influenced by

BASIC

Influenced

Visual Basic .NET, Gambas, Xojo and Basic4ppc

Visual Basic is a third-generation event-driven programming language and integrated development


environment (IDE) from Microsoft for its Component Object Model (COM) programming model first
released in 1991 and declared legacy during 2008. Microsoft intended Visual Basic to be relatively
easy to learn and use.[1][2] Visual Basic was derived from BASIC, a user-friendly programming
language designed for beginners, and it enables the rapid application development
(RAD) of graphical user interface (GUI) applications, access to databases using Data Access
Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and
objects.
A programmer can create an application using the components provided by the Visual Basic
program itself. Over time the community of programmers developed third-party components. [3][4][5][6]
[7]
Programs written in Visual Basic can also use the Windows API, which requires external function
declarations.
The final release was version 6 in 1998 (now known simply as Visual Basic). On April 8, 2008,
Microsoft stopped supporting Visual Basic 6.0 IDE. The Microsoft Visual Basic team still maintains
compatibility for Visual Basic 6.0 applications on Windows Vista, Windows Server 2008 including
R2, Windows 7, Windows 8, Windows 8.1, Windows Server 2012 and Windows 10 through its "It
Just Works" program.[8] In 2014, some software developers still preferred Visual Basic 6.0 over its
successor, Visual Basic .NET.[3][9] In 2014 some developers lobbied for a new version of Visual Basic
6.0.[10][11][12][13] In 2016, Visual Basic 6.0 won the technical impact award at The 19th Annual D.I.C.E.
Awards.[14][15][16] A dialect of Visual Basic, Visual Basic for Applications (VBA), is used as a macro or
scripting language within several Microsoft applications, including Microsoft Office.[17]

Contents
[hide]

1Language features

2Characteristics

3History

o 3.1Timeline

3.1.11990s

3.1.22000s

4Derivative languages
5Performance and other issues

6Legacy development and support

7Example code

8See also

9References

10External links

Language features[edit]
Like the BASIC programming language, Visual Basic was designed to accommodate a
steep learning curve. Programmers can create both simple and complex GUI applications.
Programming in VB is a combination of visually arranging components or controls on a form,
specifying attributes and actions for those components, and writing additional lines of code for more
functionality. Since VB defines default attributes and actions for the components, a programmer can
develop a simple program without writing much code. Programs built with earlier versions suffered
performance problems, but faster computers and native code compilation has made this less of an
issue.[citation needed] Though VB programs can be compiled into native code executables from version 5 on,
they still require the presence of around 1 MB of runtime libraries. Core runtime libraries are included
by default in Windows 2000 and later, but extended runtime components still have to be installed.
Earlier versions of Windows (95/98/NT), require that the runtime libraries be distributed with the
executable.

An empty form in Visual Basic 6

Forms are created using drag-and-drop techniques. A tool is used to place controls (e.g., text boxes,
buttons, etc.) on the form (window). Controls have attributes and event handlers associated with
them. Default values are provided when the control is created, but may be changed by the
programmer. Many attribute values can be modified during run time based on user actions or
changes in the environment, providing a dynamic application. For example, code can be inserted
into the form resize event handler to reposition a control so that it remains centered on the form,
expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box,
the program can automatically translate the case of the text being entered, or even prevent certain
characters from being inserted.
Visual Basic can create executables (EXE files), ActiveX controls, or DLL files, but is primarily used
to develop Windows applications and to interface database systems. Dialog boxes with less
functionality can be used to provide pop-up capabilities. Controls provide the basic functionality of
the application, while programmers can insert additional logic within the appropriate event handlers.
For example, a drop-down combination box automatically displays a list. When the user selects an
element, an event handler is called that executes code that the programmer created to perform the
action for that list item. Alternatively, a Visual Basic component can have no user interface, and
instead provide ActiveX objects to other programs via Component Object Model (COM). This allows
for server-side processing or an add-in module.
The runtime recovers unused memory using reference counting, which depends on variables
passing out of scope or being set to Nothing, avoiding the problem of memory leaks common to
other languages. There is a large library of utility objects, and the language provides basic support
for object-oriented programming. Unlike many other programming languages, Visual Basic is
generally not case-sensitivethough it transforms keywords into a standard case configuration and
forces the case of variable names to conform to the case of the entry in the symbol table. String
comparisons are case sensitive by default. The Visual Basic compiler is shared with other Visual
Studio languages (C, C++). Nevertheless, by default the restrictions in the IDE do not allow creation
of some targets (Windows model DLLs) and threading models, but over the years, developers have
bypassed these restrictions.

Characteristics[edit]

The code windows in Visual Basic, showing a Function using the If, Then, Else and Dim statements.

The following Visual Basic traits differ from C-derived languages:

Statements tend to terminate with keywords, such as "End If", instead of using "{}"s to group
statements.

Multiple variable assignment is not possible. A = B = C does not imply that the values of A, B
and C are equal. The boolean result of "Is B = C?" is stored in A. The result stored in A would
therefore be either false or true.

Boolean constant True has numeric value 1.[18] This is because the Boolean data type is
stored as a 16-bit signed integer. In this construct 1 evaluates to 16 binary 1s (the Boolean
value True ), and 0 as 16 0s (the Boolean value False ). This is apparent when performing a
(bitwise) Not operation on a 16-bit signed integer value 0, which returns the integer value 1, in
other words True = Not False . This inherent functionality becomes especially useful when
performing logical operations on the individual bits of an integer such
as And , Or , Xor and Not .[19] This definition of True is also consistent with BASIC since the
early 1970s Microsoft BASIC implementation and is also related to the characteristics of CPU
instructions at the time.

Logical and bitwise operators are unified. This is unlike some C-derived languages (such
as Perl), which have separate logical and bitwise operators. This again is a traditional feature of
BASIC.
Variable array base. Arrays are declared by specifying the upper and lower bounds in a way
similar to Pascal and Fortran. It is also possible to use the Option Base statement to set the
default lower bound. Use of the Option Base statement can lead to confusion when reading
Visual Basic code and is best avoided by always explicitly specifying the lower bound of the
array. This lower bound is not limited to 0 or 1, because it can also be set by declaration. In this
way, both the lower and upper bounds are programmable. In more subscript-limited languages,
the lower bound of the array is not variable. This uncommon trait does exist in Visual Basic
.NET but not in VBScript.
OPTION BASE was introduced by ANSI, with the standard for ANSI Minimal BASIC in the
late 1970s.

Relatively strong integration with the Windows operating system and the Component Object
Model. The native types for strings and arrays are the dedicated COM types, BSTR and
SAFEARRAY.

Banker's rounding as the default behavior when converting real numbers to integers with
the Round function.[20] ? Round(2.5, 0) gives 3, ? Round(3.5, 0) gives 4.

Integers are automatically promoted to reals in expressions that involve the normal division
operator ( / ) so that division of one integer by another produces the intuitively correct result.
VB provides a specific integer divide operator ( \ ) that does truncate.

By default, if a variable has not been declared or if no type declaration character is specified,
the variable is of type Variant . However this can be changed with Deftype statements
such as DefInt , DefBool , DefVar , DefObj , DefStr . There are
12 Deftype statements in total offered by Visual Basic 6.0. The default type may be
overridden for a specific declaration by using a special suffix character on the variable name
( # for Double, ! for Single, & for Long, % for Integer, $ for String, and @ for Currency) or
using the key phrase As (type) . VB can also be set in a mode that only explicitly declared
variables can be used with the command Option Explicit .

History[edit]
Alan Cooper created the drag-and-drop design for the user interface of Visual Basic.

Visual Basic 1.0 was introduced in 1991. The drag and drop design for creating the user
interface is derived from a prototype form generator developed by Alan Cooper and his company
called Tripod.[21][discuss] Microsoft contracted with Cooper and his associates to develop Tripod into a
programmable form system for Windows 3.0, under the code name Ruby (no relation to the
later Ruby programming language). Tripod did not include a programming language at all.
Microsoft decided to combine Ruby with the Basic language to create Visual Basic. The Ruby
interface generator provided the "visual" part of Visual Basic and this was combined with the
"EB" Embedded BASIC engine designed for Microsoft's abandoned "Omega" database system.
Ruby also provided the ability to load dynamic link libraries containing additional controls (then
called "gizmos"), which later became the VBX interface.[22]

Event-driven programming
From Wikipedia, the free encyclopedia
Programming paradigms

Action

Agent-oriented

Array-oriented

Automata-based

Concept

Concurrent computing

Relativistic programming

Data-driven

Declarative (contrast: Imperative)

Constraint

Constraint logic

Concurrent constraint logic

Dataflow
Flow-based

Cell-oriented (spreadsheets)

Reactive

Functional

Functional logic

Purely functional

Logic

Abductive logic

Answer set

Concurrent logic

Functional logic

Inductive logic

Dynamic

End-user programming

Event-driven

Service-oriented

Time-driven

Expression-oriented

Feature-oriented

Function-level (contrast: Value-level)


Generic

Imperative (contrast: Declarative)

Literate

Procedural

Inductive programming

Language-oriented

Natural language programming

Discipline-specific

Domain-specific

Grammar-oriented

Dialecting

Intentional

Metaprogramming

Automatic

Reflective

Attribute-oriented

Homoiconic

Macro

Template

Policy-based
Non-structured (contrast: Structured)

Array

Nondeterministic

Parallel computing

Process-oriented

Point-free style

Concatenative

Probabilistic

Semantic

Structured (contrast: Non-structured)

Block-structured

Modular (contrast: Monolithic)

Object-oriented

Actor-based

Class-based

Concurrent

Prototype-based

By separation of concerns:

Aspect-oriented

Role-oriented
Subject-oriented

Recursive

Value-level (contrast: Function-level)

v
t
e

In computer programming, event-driven programming is a programming paradigm in which


the flow of the program is determined by events such as user actions (mouse clicks, key
presses), sensor outputs, or messages from other programs/threads. Event-driven programming is
the dominant paradigm used in graphical user interfaces and other applications (e.g. JavaScript web
applications) that are centered on performing certain actions in response to user input. This is also
true of programming for device drivers (e.g. P in USB device driver stacks[1])
In an event-driven application, there is generally a main loop that listens for events, and then triggers
a callback function when one of those events is detected. In embedded systems the same may be
achieved using hardware interrupts instead of a constantly running main loop. Event-driven
programs can be written in any programming language, although the task is easier in languages that
provide high-level abstractions, such as closures.

Contents
[hide]

1Event handlers

o 1.1A trivial event handler

o 1.2Exception handlers

o 1.3Creating event handlers

2Common uses

3Criticism

4Stackless threading

5See also

6References

7External links

Event handlers[edit]
Main article: Event handler
A trivial event handler[edit]
Because the code for checking for events and the main loop do not depend on the application, many
programming frameworks take care of their implementation and expect the user to provide only the
code for the event handlers. In this simple example there may be a call to an event handler
called OnKeyEnter() that includes an argument with a string of characters, corresponding to what
the user typed before hitting the ENTER key. To add two numbers, storage outside the event handler
must be used. The implementation might look like below.

globally declare the counter K and the integer T.


OnKeyEnter(character C)
{
convert C to a number N
if K is zero store N in T and increment K
otherwise add N to T, print the result and reset K to zero
}

While keeping track of history is straightforward in a batch program, it requires special attention and
planning in an event-driven program.
Exception handlers[edit]
In PL/1, even though a program itself may not be predominantly event-driven, certain abnormal
events such as a hardware error, overflow or "program checks" may occur that possibly prevent
further processing. Exception handlers may be provided by "ON statements" in (unseen) callers to
provide housekeeping routines to clean up afterwards before termination.
Creating event handlers[edit]
The first step in developing an event-driven program is to write a series of subroutines, or methods,
called event-handler routines. These routines handle the events to which the main program will
respond. For example, a single left-button mouse-click on a command button in a GUI program may
trigger a routine that will open another window, save data to a database or exit the application. Many
modern-day programming environments provide the programmer with event templates, allowing the
programmer to focus on writing the event code.
The second step is to bind event handlers to events so that the correct function is called when the
event takes place. Graphical editors combine the first two steps: double-click on a button, and the
editor creates an (empty) event handler associated with the user clicking the button and opens a text
window so you can edit the event handler.
The third step in developing an event-driven program is to write the main loop. This is a function that
checks for the occurrence of events, and then calls the matching event handler to process it. Most
event-driven programming environments already provide this main loop, so it need not be
specifically provided by the application programmer. RPG, an early programming language
from IBM, whose 1960s design concept was similar to event-driven programming discussed above,
provided a built-in main I/O loop (known as the "program cycle") where the calculations responded in
accordance to 'indicators' (flags) that were set earlier in the cycle.

Common uses[edit]
Most of existing GUI development tools and architectures rely on event-driven programming. [2]
In addition, systems such as Node.js are also event-driven [3]

Criticism[edit]
The design of those programs which rely on event-action model has been criticised, and it has been
suggested that event-action model leads programmers to create error prone, difficult to extend and
excessively complex application code.[2] Table-driven state machines have been advocated as a
viable alternative.[4] On the other hand, table-driven state machines themselves suffer from significant
weaknesses including "state explosion" phenomenon. [5]

Stackless threading[edit]
An event-driven approach is used in hardware description languages. A thread context only needs a
CPU stack while actively processing an event, once done the CPU can move on to process other
event-driven threads, which allows an extremely large number of threads to be handled. This is
essentially a finite-state machine approach.

Introduction to Visual Basic


Visual Basic is a programming language and development environment created by Microsoft.

Visual Basic provides a graphical user interface GUI that allows the developer drag and drop
objects into the program as well as manually write program code.

Visual Basic, also referred to as "VB," is designed to make software development easy and
efficient

Visual Basic 6.0


1. Visual Basic is a programming language and integrated development environment.

2. It derives from the much older BASIC programming language, and so is considered useful and
easy programming language for the beginner to learn.

3. Visual Basic 6.0 was the final edition of Visual Basic.

Feature Of visual basic 6.0


1. Learning Consists of all necessary tools required to build main stream Windows Applications
2. Professional Includes advanced features such as tools to develop ActiveX and Internet controls.
3. Enterprise In addition to all Professional features, it also includes tools such as Visual
Features of visual basic
GUI Interface
Modularization

Object Oriented

Debugging

Macros IDE
Data access feature

Guo Interface: - VB is a Graphical User Interface language. This means that a VB program will
always show something on the screen that the user can interact with to get a job done.
Modularization: - It is considered good programming practice to modularize your programs. Small
modules where it is clearly indicated what comes into the module and what goes out makes a program
easy to understand.
Object Oriented: - Object Oriented Programming is a concept where the programmer thinks of the
program in "objects" that interact with each other. Visual Basic forces this good programming practice.
Debugging: - Visual Basic offers two different options for code debugging:- Debugging Managed
Code Runtime Debugger The Debugging Managed Code individually debugs C and C++ applications
and Visual Basic Windows applications. The Runtime Debugger helps to find and fix bugs in programs
at runtime.
Data Access Feature: - By using data access features, we can create databases, scalable server-side
components for most databases, including Microsoft SQL Server and other enterprise-level database.
Macros IDE: - The Macros integrated development environment is similar in design and function to
the Visual Studio IDE. The Macros IDE includes a code editor, tool windows, the properties windows
and editors.

VB 6.0 ADVANCED TUTORIAL PDF


1/20/2017

0 COMMENTS

Visual Basic Tutorials. Tutorials Shared by the Internet Community.


Menus are among the most common and most characteristic

elements of the Windows user interface. The Text. Box control is the

primary mechanism for displaying and entering text. Applications are

made up of one or more forms usually more than one. The benefit of

using multidimensional arrays is that they are conceptually easier to

manage. In Visual Basic as in any other programming language,

variables store values during a programs executionhttp:

//visualbasic.

About the Tutorial VB.Net is a simple. Visual Basic Manual Tutorial

Pdf 2010 Advanced. Visual Basic Manual Tutorial Pdf 2010 Advanced.

Visual Basic 6 (VB6) tutorial for beginners. Learn Visual Basic 6 with

VB sample codes and. This Visual Basic 6 tutorial is for anyone who

wants to learn to program his or her. Creating Advanced PDF

documents in VB. Download the Advanced PDF VB Tutorial source

code to see the full sample. I have Adobe Acrobat 9.0 Standard. I

have a whole bunch of pdf.

As a matter of fact, most programs store sets of data of different

types. A standard structure for storing data in any programming


language is the array. Learn visual basic. NET with VB 2. 00. Visual

Basic 6 tutorial for advanced vb programmers. Learn VB6. Free

tutorial for beginners. Explained with examples and source code.

ADVANCED VISUAL BASIC BOOKS VB INTERNET


PROGRAMMING BOOKS. RESOURCES VISUAL BASIC
LINKS ADD A LINK SUBSCRIBE TO MAILING LIST.
VISUAL BASIC TUTORIAL . IT HAS BEEN
EXTRACTED FROM ' MICROSOFT VISUAL BASIC 6.0
PROFESSIONAL.
Displays a prompt in a dialog box, waits for the user to input text or

click a button, and returns a String containing the contents of the

text box. In this lesson, we learn how to interact with another

underlying set of code by programming the Windows applications

interface (API) using dynamic linhttp: //visualbasic. An array is a

consecutive group of memory locations that all have the same name

and the same type. Displays a message in a dialog box and wait for

the user to click a button, and returns an integer indicating which

button the user clicked. Error ans handling debugging tutorial for

Visual Basic 6 programminghttp: //visualbasic. Visual Basic Tutorial

for beginners.
Explained with examples and source code.

Visual Basic Programming Tutorials . Programs developed in Visual

Basic will only run on a Windows Operating System. Visual Basic is

easy to learn, fun and powerful! The current tutorials are all tested

with Visual Studio 2. Net. Framework 4.

Version 4. 5 will be able to support . Net. Framework 4. These

tutorials were written in . Net Framework 4. 0.


Visual Basic is initiated by using the Programs option > Microsoft Visual Basic 6.0 > Visual Basic 6.0.
Clicking the Visual Basic icon, we can view a copyright screen enlisting the details of the license holder of
the copy of Visual Basic 6.0. Then it opens in to a new screen as shown in figure 1 below, with the
interface elements Such as MenuBar, ToolBar, The New Project dialog box. These elements permit the
user to buid different types of Visual Basic applications.

The Integrated Development Environment


One of the most significant changes in Visual Basic 6.0 is the Integrated Development Environment (IDE).
IDE is a term commonly used in the programming world to describe the interface and environment that we
use to create our applications. It is called integrated because we can access virtually all of the
development tools that we need from one screen called an interface. The IDE is also commonly referred
to as the design environment, or the program.

Tha Visual Basic IDE is made up of a number of components

Menu Bar

Tool Bar

Project Explorer

Properties window

Form Layout Window

Toolbox

Form Designer

Object Browser

In previous versions of Visual Basic, the IDE was designed as a Single Document Interface (SDI). In a
Single Document Interface, each window is a free-floating window that is contained within a main window
and can move anywhere on the screen as long as Visual Basic is the current application. But, in Visual
Basic 6.0, the IDE is in a Multiple Document Interface (MDI) format. In this format, the windows
associated with the project will stay within a single container known as the parent. Code and form-based
windows will stay within the main container form.

Figure 1 The Visual Basic startup dialog box


Menu Bar
This Menu Bar displays the commands that are required to build an application. The main menu items
have sub menu items that can be chosen when needed. The toolbars in the menu bar provide quick
access to the commonly used commands and a button in the toolbar is clicked once to carry out the
action represented by it.

Toolbox
The Toolbox contains a set of controls that are used to place on a Form at design time thereby creating
the user interface area. Additional controls can be included in the toolbox by using the Components menu
item on the Project menu. A Toolbox is represented in figure 2 shown below.

Figure 2 Toolbox window with its controls available commonly.


Control Description
Pointer Provides a way to move and resize the controls form
Displays icons/bitmaps and metafiles. It displays text or acts as a visual
PictureBox
container for other controls.
TextBox Used to display message and enter text.
Frame Serves as a visual and functional container for controls
CommandButton Used to carry out the specified action when the user chooses it.
CheckBox Displays a True/False or Yes/No option.
OptionButton control which is a part of an option group allows the user to
OptionButton
select only one option even it displays mulitiple choices.
ListBox Displays a list of items from which a user can select one.
Contains a TextBox and a ListBox. This allows the user to select an ietm
ComboBox
from the dropdown ListBox, or to type in a selection in the TextBox.
HScrollBar and These controls allow the user to select a value within the specified range
VScrollBar of values
Timer Executes the timer events at specified intervals of time
DriveListBox Displays the valid disk drives and allows the user to select one of them.
DirListBox Allows the user to select the directories and paths, which are displayed.
FileListBox Displays a set of files from which a user can select the desired one.
Shape Used to add shape (rectangle, square or circle) to a Form
Line Used to draw straight line to the Form
used to display images such as icons, bitmaps and metafiles. But less
Image
capability than the PictureBox
Data Enables the use to connect to an existing database and display
information from it.
Used to link or embed an object, display and manipulate data from other
OLE
windows based applications.
Label Displays a text that the user cannot modify or interact with.

Project Explorer
Docked on the right side of the screen, just under the tollbar, is the Project Explorer window. The Project
Explorer as shown in in figure servres as a quick reference to the various elements of a project
namely form, classes and modules. All of the object that make up the application are packed in a project.
A simple project will typically contain one form, which is a window that is designed as part of a program's
interface. It is possible to develop any number of forms for use in a program, although a program may
consist of a single form. In addition to forms, the Project Explorer window also lists code modules and
classes.

Figure 3 Project Explorer

Properties Window
The Properties Window is docked under the Project Explorer window. The Properties Window exposes
the various characteristics of selected objects. Each and every form in an application is considered an
object. Now, each object in Visual Basic has characteristics such as color and size. Other characteristics
affect not just the appearance of the object but the way it behaves too. All these characteristics of an
object are called its properties. Thus, a form has properties and any controls placed on it will have
propeties too. All of these properties are displayed in the Properties Window.

Object Browser
The Object Browser allows us to browse through the various properties, events and methods that are
made available to us. It is accessed by selecting Object Browser from the View menu or pressing the key
F2. The left column of the Object Browser lists the objects and classes that are available in the projects
that are opened and the controls that have been referenced in them. It is possible for us to scroll through
the list and select the object or class that we wish to inspect. After an object is picked up from the Classes
list, we can see its members (properties, methods and events) in the right column.

A property is represented by a small icon that has a hand holding a piece of paper. Methods are denoted
by little green blocks, while events are denoted by yellow lightning bolt icon.

Object naming conversions of controls (prefix)


Form -frm
Label-lbl
TextBox-txt
CommandButton-cmd
CheckBox -chk
OptionButton -opt
ComboBox -cbo
ListBox-lst
Frame-fme
PictureBox -pic
Image-img
Shape-shp
Line -lin
HScrollBar -hsb
VScrollBar -vsb

This documentation is archived and is not being maintained.

3.1 The Control Properties


Before writing an event procedure for the control to response to an event, you have to set
certain properties for the control to determine its appearance and how will it work with the
event procedure. You can set the properties of the controls in the properties window or at
runtime.

Figure 3.1 below is a typical properties window for a form. In the properties window, the item
appears at the top part is the object currently selected. At the bottom part, the items listed in
the left column represent the names of various properties associated with the selected
object while the items listed in the right column represent the states of the properties.
Properties can be set by highlighting the items in the right column then change them by
typing or selecting the options available.

For example, in order to change the caption, just highlight Form1 under the name Caption
and change it to other names. You may also alter the appearance of the form by setting it to
3D or flat, change its foreground and background color, change the font type and font size,
enable or disable, minimize and maximize buttons and more.
Figure 3.1

You can also change the properties at runtime to give special effects such as change of
color, shape, animation effect and so on. Example 3.1 show the code that will change the
form color to red every time the form is loaded. VB uses the hexadecimal system
to represent the color. You can check the color codes in the properties windows which are
showing up under ForeColor and BackColor .

Example 3.1: Program to change background color

This example changes the background colour of the form using the BackColor property.

Private Sub Form_Load()


Form1.Show
Form1.BackColor = &H000000FF&
End Sub

Example 3.2: Program to change shape

This example is to change the control's Shape using the Shape property. This code will
change the shape to a circle at runtime.

Private Sub Form_Load()


Shape1.Shape = 3
End Sub

We are not going into the details on how to set the properties yet. However, we would like to
stress a few important points about setting up the properties.

You should set the Caption Property of a control clearly so that a user knows what to
do with that command.

Use a meaningful name for the Name Property because it is easier to write and
read the event procedure and easier to debug or modify the programs later.

One more important property is whether to make the control enabled or not.
Finally, you must also considering making the control visible or invisible at runtime,
or when should it become visible or invisible.

3.2 Handling some of the common controls


Figure 3.2 below is the VB6 toolbox that shows the basic controls.

Figure 3.2: Toolbox

3.2.1 The Text Box

The text box is the standard control for accepting input from the user as well as to display
the output. It can handle string (text) and numeric data but not images or pictures.String in a
text box can be converted to a numeric data by using the function Val(text). The following
example illustrates a simple program that processes the input from the user.

Example 3.3

In this program, two text boxes are inserted into the form together with a few labels. The two
text boxes are used to accept inputs from the user and one of the labels will be used to
display the sum of two numbers that are entered into the two text boxes. Besides, a
command button is also programmed to calculate the sum of the two numbers using the
plus operator. The program use creates a variable sum to accept the summation of values
from text box 1 and text box 2.The procedure to calculate and to display the output on the
label is shown below. The output is shown in Figure 3.3

Private Sub Command1_Click()


'To add the values in text box 1 and text box 2
Sum = Val(Text1.Text) +Val(Text2.Text)
'To display the answer on label 1
Label1.Caption = Sum
End Sub

Figure 3.3

3.2.2 The Label

The label is a very useful control for Visual Basic, as it is not only used to provide
instructions and guides to the users, it can also be used to display outputs. One of its most
important properties is Caption. Using the syntax label.Caption, it can display text and
numeric data . You can change its caption in the properties window and also at runtime.
Please refer to Example 3.1 and Figure 3.1 for the usage of label.

3.2.3 The Command Button


The command button is one of the most important controls as it is used to execute
commands. It displays an illusion that the button is pressed when the user click on it. The
most common event associated with the command button is the Click event, and the syntax
for the procedure is

Private Sub Command1_Click ()


Statements
End Sub

3.2.4 The Picture Box

The Picture Box is one of the controls that is used to handle graphics. You can load a
picture at design phase by clicking on the picture item in the properties window and select
the picture from the selected folder. You can also load the picture at runtime using
the LoadPicture method. For example, the statement will load the picture grape.gif into the
picture box.

Picture1.Picture=LoadPicture ("C:\VBprogram\Images\grape.gif")

You will learn more about the picture box in future lessons. The image in the picture box is
not resizable.

3.2.5 The Image Box

The Image Box is another control that handles images and pictures. It functions almost
identically to the picture box. However, there is one major difference, the image in an Image
Box is stretchable, which means it can be resized. This feature is not available in the Picture
Box. Similar to the Picture Box, it can also use the LoadPicture method to load the picture.
For example, the statement loads the picture grape.gif into the image box.

Image1.Picture=LoadPicture ("C:\VBprogram\Images\grape.gif")

3.2.6 The List Box

The function of the List Box is to present a list of items where the user can click and select
the items from the list. In order to add items to the list, we can use the AddItem method.
For example, if you wish to add a number of items to list box 1, you can key in the following
statements

Example 3.4
Private Sub Form_Load ( )
List1.AddItem "Lesson1"
List1.AddItem "Lesson2"
List1.AddItem "Lesson3"
List1.AddItem "Lesson4"

End Sub

The items in the list box can be identified by the ListIndex property, the value of the
ListIndex for the first item is 0, the second item has a ListIndex 1, and the third item has a
ListIndex 2 and so on

3.2.7 The Combo Box

The function of the Combo Box is also to present a list of items where the user can click and
select the items from the list. However, the user needs to click on the small arrowhead on
the right of the combo box to see the items which are presented in a drop-down list. In order
to add items to the list, you can also use the AddItem method. For example, if you wish to
add a number of items to Combo box 1, you can key in the following statements

Example 3.5

Private Sub Form_Load ( )

Combo1.AddItem "Item1"
Combo1.AddItem "Item2"
Combo1.AddItem "Item3"
Combo1.AddItem "Item4"

End Sub

3.2.8 The Check Box

The Check Box control lets the user selects or unselects an option. When the Check Box is
checked, its value is set to 1 and when it is unchecked, the value is set to 0. You can
include the statements Check1.Value=1 to mark the Check Box and Check1.Value=0 to
unmark the Check Box, as well as use them to initiate certain actions. For example, the
program will change the background color of the form to red when the check box is
unchecked and it will change to blue when the check box is checked. You will learn about
the conditional statement If.Then.Elesif in later lesson. VbRed and vbBlue are color
constants and BackColor is the background color property of the form.
Example 3.6

Private Sub Command1_Click()


If Check1.Value = 1 And Check2.Value = 0 Then
MsgBox "Apple is selected"
ElseIf Check2.Value = 1 And Check1.Value = 0 Then
MsgBox "Orange is selected"
Else
MsgBox "All are selected"
End If

End Sub

3.2.9 The Option Box

The Option Box control also lets the user selects one of the choices. However, two or more
Option Boxes must work together because as one of the Option Boxes is selected, the other
Option Boxes will be unselected. In fact, only one Option Box can be selected at one time.
When an option box is selected, its value is set to True and when it is unselected; its value
is set to False. In the following example, the shape control is placed in the form together
with six Option Boxes. When the user clicks on different option boxes, different shapes will
appear. The values of the shape control are 0, 1, and 2,3,4,5 which will make it appear as a
rectangle, a square, an oval shape, a rounded rectangle and a rounded square respectively.

Example 3.7

Private Sub Option1_Click ( )


Shape1.Shape = 0
End Sub

Private Sub Option2_Click()


Shape1.Shape = 1

End Sub

Private Sub Option3_Click()


Shape1.Shape = 2
End Sub

Private Sub Option4_Click()


Shape1.Shape = 3
End Sub
Private Sub Option5_Click()
Shape1.Shape = 4
End Sub

Private Sub Option6_Click()


Shape1.Shape = 5
End Sub

3.2.10 The Drive List Box

The Drive ListBox is for displaying a list of drives available in your computer. When you
place this control into the form and run the program, you will be able to select different
drives from your computer as shown in Figure 3.4

Figure 3.4 The Drive List Box

3.2.11 The Directory List Box

The Directory List Box is for displaying the list of directories or folders in a selected drive.
When you place this control into the form and run the program, you will be able to select
different directories from a selected drive in your computer as shown in Figure 3.5
Figure 3.5 The Directory List Box

3.2.12 The File List Box

The File List Box is for displaying the list of files in a selected directory or folder. When you
place this control into the form and run the program, you will be able to shown the list of files
in a selected directory as shown in Figure 3.6

Figure 3.6 The File List Box


You can coordinate the Drive List Box, the Directory List Box and the File List Box to search
for the files you want. The procedure will be discussed in later lessons.

ASP.Net Toolbox (Standard Controls): Part 1 in


VB.NET

Abhimanyu K Vatsa

Nov 10 2012

Article

57.4k

facebook

twitter

linkedIn

google Plus

Reddit

o
o

Expand

Download 100% FREE Spire Office APIs

Introduction

Toolbox is very-very important building block of .NET Framework. Toolbox is an area where all the
controls existed. It helps the developer to develop any application very quickly, only drag the control from
the toolbox and drop it on the form. To change its properties we have to select the control and make the
properties changes from Properties window. We can do it manually by writing code-behind. There are
over 100 controls available in ASP.NET 4.0. I am listing here all the controls available in ASP.NET 4.0 and
writing some lines on each of them.
1. Standard Controls

Name explains everything. This section includes list of controls which is widely used.

Pointer: It is just a pointer. If we drag any other control on form it causes to create that control
on form but pointer does not create any control on form. In other word we can say, we select it
for to ignore any other selected control.

AdRotator: This control is used to display the image adds on web page. We can use multiple
images and multiple urls. This control can be controlled by xml or any other database very easily.
Assume that we have an area on web page where we want to display adds of our four clients then
we can use the advantage of this control.
BulletedList: This control is used to display list of items with bullets. We can connect this control
to database to display list items.

Button: Very widely used control. Writing some lines about this control is very tinny thing. It is
used everywhere like have to submit form, login, delete, create user, etc.

Calendar: This control is used to pick the correct format of date. If we want to pick the date in
text box then we have to write TextBox1.Text=Calendar1.SelectedDate in SelectionChanged event
of Calendar.

CheckBox: This control is used to accept the data in true/false or say in yes/no Boolean format.
Like if we checked it then it says true or yes. By default its checked property is false but we can set
it to true. CheckBox cannot be bind with database.

CheckBoxList: This control also works as checkbox as given above but it has some more
properties like, it can have collection of check boxes, and one great advantage, it has database
binding property.

DropDownList: This control is used to select any one item from list of items. We can not select
multiple items from dropdownlist. It has also database binding property.

FileUpload: This control is used to upload any type of file. After writing some code behind it only
selects specified format of files, like we can set it to select only jpg and gif files. It provides the
user a way to send the file to any other computer using internet.

HiddenField: This control gives the developer a way to store information without displaying it on
the page or say to user. Mostly it is used to store the states.

HyperLink: This control is used to link any other page. Like when user clicks on Home page it
navigates to home.aspx page, this is because of hyperlink feature.

Image: This control is used to display the image on the form. Like if you open any community
website and have look your image means they have used image control. Using ImageUrl property
we can change the image.

ImageButton: This control look like button control but it has image. We simply click on image
and works like button control. We can set its image using ImageUrl property.

ImageMap: This control is also known as hot spot control. We can categories any one in image
into multiple sections or say regions and each section (regions) has different urls.

Label: This control is mostly used to display texts con form. Programmatically we can hide/unhide
or set the text for label, and this feature helps the developer to display some message when any
task completed.

LinkButton: This controls works like hyperlink button. It is mostly used to post back a form to
server.
ListBox: This control is used to select one or more items from predefined items. It has same
properties list as combo box but combo box can't select multiple items. Change SelectionMode
property to multiple in ListBox for multiple selections.

Literal: This control is used to display text directly to client browsers. It works as container and we
can't apply any style to it.

Localize: This control is used to display localize text anywhere in browser. This control has only
two properties Text and ID. We also can't apply any style to this control.

MultiView: This control is used to display different view to different client based on some criteria.

Panel: This control is very useful because it works like container of every control. Assume we have
very long content page and wishing to display it in very short area on web page, surely we can
use it by enabling ScrollBars property.

PlaceHolder: This control is used to place new controls dynamically or say at run time. It is simply
a place of control which only results at run time.

RadioButton: This control is used to accept the data in true/false or say in yes/no Boolean
format. Like if we select it then it says true or yes. By default its checked property is false but we
can set it to true. RadioButton cannot be bind with database.

RadioButtonList: This control also works as RadioButton as given above but it has some more
properties like, it can have collection of radio buttons, and one great advantage that it has
database binding property.

Substitution: This control is very famous in advertise or news portals where some area of web
page are frequently changes, it is no mean visitor is refreshing the page or navigating or not.

Table: This control enables us to create table on web page. We can create row or columns in
table.

TextBox: This control is used to enter information for processes. Like if we are wishing to create a
web page where user can enter his username and password, surely take the advantage of text box
here. We can change the TextBox TextMode property by SingleLine, MultiLine or Password.

View: This control also works as container of another control on web page. It only works with
MultiView control.

Wizard: This control is very useful when we wish to create any form which has multiple steps or
say multiple sections on the same form. It mostly used to collection the user information.

Xml: This control is mostly used to display the xml content or to display the result of xsl
transformation on the web page.
CREATE AN EXE OR SETUP FILE IN .NET
WINDOWS APPLICATION

116 Votes

Hi .NET Architects!

Visual Studio Setup and deployment Projects provides to make an executable or installer

file in .NET windows application is easy and rapidly.

Visual Studio provides templates for four types of deployment projects: Merge Module

Project, Setup Project, Web Setup Project, and Cab Project. In addition, a Setup wizard is

provided to help step you through the process of creating deployment projects. You can

see the templates and the wizard in the New Project dialog box under the Setup and

Deployment Projects node.

The following are guidelines for choosing the right type of deployment project for your

project.

1)Merge Module Project : Packages components that might be shared by multiple

applications.

2)Setup Project : Builds an installer for a Windows-based application.

3)Web Setup Project : Builds an installer for a Web application.

4)Cab Project : Creates a cabinet file for downloading to a legacy Web browser.

5)Smart Device Cab Project : Creates a Cab project to deploy device applications.

This topic demonstrates deployment using a Setup and Deployment Project.


Setup Projects

Setup projects allow you to create installers in order to distribute an application. The

resulting Windows Installer (.msi) file contains the application, any dependent files,

information about the application such as registry entries, and instructions for

installation. When the .msi file is distributed and run on another computer, you can be

assured that everything necessary for installation is included; if for any reason the

installation fails (for example, the target computer does not have the required operating

system version), the installation will be rolled back and the computer returned to its pre

installation state.

I. Create Setup Project


The following steps will gives the elegant guidance to create an executable or installer

file.

1. Go to file menu > click Add > new project >now Add New Project dialog will appear.

2. Select the Other Project Types and click Setup and Deployment projects,Choose

Setup Project give name project name in name text box finally click OK.
3. New project appear in solution explorer,for eg., you have give the name MyEXE file

will be displays with given name.

4.Right click the MyEXE > go View > click File System
5.You can see the File System on TargetMachineunder three folders

Application Folder

Users Desktop

Users Program Menu

6.Select Application Folder and right click Add>Project Output>select Primary output
7. Select Users Desktop right click on the right side pane>click create new

shortcut>select output file from Application folder>change the file name from primary

output name to MyEXE

Next >>

Same procedure follows the users program menu also

8.If you want to change the Manufactures name, just right click the project go to

properties
Change the properties as per you requirement

9.Finally Build the new project

11. Select the Release folder for build. (Select Properties in right click of Setup Project)
12. Set the Compression Mode

Mode 1: Optimization for speed (Installation Speed)

Mode 2: Optimization for size (Setup file size)

13. Once successfully build the setup. Please look up in inside Release folder

When you want to install the setup file or exe file on the client machine, before you

should be installed .NET Framework on that machine because, Applications and controls

written for the .NET Framework v2.0 requires the .NET Framework Redistributable

Package version 2.0 to be installed on the computer where the application or control

runs. (Framework 4.0 need .NET Framework 4 Client Profile).

#1 .NET Framework 2.0 Redistributable Package Downlaod

#2 .NET Framework 4 Client Profile Downlaod

II. Create shortcut icon in Users Desktop, Users Programs


Menu and Add/Remove Programs
Note: System support only .ico file format

a. Users Desktop

Step 1: Add an icon file (.ico) in project


Step2: Select the icon file

Stpe3: Icon file added in Application Folder

Step4: Select Users Desktop or Users Program Menu and right click on right side

pane

Step5: Add primary output of actual application and click OK to select


Step6: Rename the actual name to your desired project/product name

Step7: Here the sample product name is Your Product Name for demo purpose

Step8: If we want to add icon on shortcut, Click Properties Window


Step 9: Select Icon, next Browse icon file

Step10: Browse icon file in Application Folder


Step 11: Click Application Folder
Step 12: Add File button will be enable once you have clicked the Application Folder

Step 13: Select your product icon and Click OK

b. Users Programs Menu

Kindly follow the same steps for shortcut added in Users Program Menu.

C. Add/Remove Programs Icon

If you want to add your icon in Control Panel > Programs >Uninstall, You need to follow

the below steps.

Step 1: Select the setup project in Solution Explorer and right click, select the

properties

Add the icon from Application Folder.


View Icons

Install your setup in target machine, You can view the shortcuts in Desktop, Start Menu

and Uninstall Programs.

Figure 1: Shortcut icon in Desktop

Figure 2: Shortcut icon in Users Program Menu

Figure 3: Shortcut icon in Uninstall Programs

III. Add Prerequisites


Prerequisites are provide support resources to run the installed process on your target

machine.

Visual Setup and Deployment projects are automatically detect the required

prerequisites need to install the system. But the question is what is the source for install

the prerequisites? No need to worry, Visual Studio IDE provides three options to install

the prerequisites on your system.


Download prerequisites from component vendors website (default option)

Download prerequisites from the same location as my application

Download prerequisites from the following location

How to add prerequisites in Visual Studio?

1. Select Project in Solution Explorer, Right click

2. Click the Prerequisites button in Property Pages


3. Select the required prerequisites from the window
Click Ok, prerequisites will associate based on your install location selection.

IV. Setup file User Interface customization


If you want to customize the installation process screens. Visual Studio provides facility

through User Interface.

Right click of setup project, Select View and Click User Interface.

Here, you can see the hierarchy tree of installation process screens.
a. Add new dialog window

Step 1: Right click desired selection, Select Add Dialog

Step 2: Select the dialog which you wish to add

Step 3: New dialog added

b. Re-order the Screens

Right click of desired screen which you need to move the specific place and select

Move Up and Move Down


c. Change the text and banner images

Right click and select the Properties Window where you need to edit the text and

image.

Once youve complete the changes and Build the project again. Now, you setup file is

professionally ready.

V. Prevent Multiple Instance Running.


How do avoid multiple instance in installed application?

In Program.cs file add the below code.

static void Main()

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Process[] process = Process.GetProcessesByName(Application.ProductName); //Prevent

multiple instance

if (process.Length > 1)

MessageBox.Show("{Application Name} is already running. This instance will now

close.", "{Application Name}",

MessageBoxButtons.OK, MessageBoxIcon.Information);

Application.Exit();

else

{
Application.Run(new <Initial Form>());

The difference between


captions and transcripts
April 6, 2015 at 8:31am by kerr.63@osu.edu
In a recent post from ODEE, Getting started with
captions(http://u.osu.edu/distanceeducation/2015/04/03/getting-started-with-
captions/), some of the benefits of captioning videos and some ways to get
started adding captions to videos are presented. This post adds some
information on another option for supplementing videos through the use
of transcripts.

How is a transcript different from captions? Captions appear onscreen


simultaneously with the audio and video, and follows the same timing. It
exists within the video player, and generally speaking, cant be referenced
outside of the video. A transcript is the same word-for-word content as
captions, but presented in a separate document, whether it is a text file,
word processing document, PDF, or web page. The transcript of a video could
easily be generated from a script, if the video was scripted before
production. If the video was not scripted, then the same process of
transcribing the audio from the video into typed words is required.

A transcript can also be time indexed, or simply text. A time indexed


transcript can be used to generate captions for a video. It contains a discrete
unit of time and the spoken audio that occurs within that time frame, very
similar to a caption.

Both captioning and providing transcripts allow viewers to access content


from a video by alternate formats, which, in learning environments, adds to a
resources accessibility requirements as well as supporting universal design
for learning (UDL).

What is the difference between open and


closed captioning?
DO-IT Factsheet #1050
/articles?1050
Video has played an important role in education for many decades. Now, in the
form of computer-based multimedia, video is increasingly utilized in distance
learning and other web-based educational applications. However, the audio portion
of a video presentation is inaccessible to people who are deaf or hard of hearing
unless it includes captions. Captions are on-screen text descriptions that display a
video product's dialogue, identify speakers, and describe other relevant sounds that
are otherwise inaccessible to people who are deaf or hard of hearing. Captions are
synchronized with the video image so that viewers have equivalent access to the
content that is originally presented in sound, regardless of whether they receive
that content via audio or text. Captions are either open or closed. Open captions
always are in view and cannot be turned off, whereas closed captions can be
turned on and off by the viewer.
For video that is displayed on television sets, special devices called decoders must
be available in order to view closed captions. Since 1993, decoders have been
required to be built into television sets 13 inches or larger sold for use in the United
States.
When videos are accessed on the World Wide Web, they also may have captions
that are open or closed. Closed captions appear only when the user agent (e.g., a
media viewer player) supports them. At least one version of most major media
viewer software applications now supports closed captions. Some of these
products may support captions in their stand-alone client versions but not in
browser-embedded or handheld versions of their products.
Delivering video products with closed captions places responsibility on the user to
understand how to turn captions on, either on their television sets or in their media
viewer software. So that the user isn't faced with this burden, some people argue in
favor of delivering video products with open captions. Open-captioning proponents
also argue that captioning has universal design [1] benefits for people other than
those with hearing impairments (e.g., people whose first language is not English;
people in noisy airports, health clubs, sports bars). Also, when the spoken word of
all speakers is open-captioned, additional translation for speakers who have
speech impairments is not required.
Despite the advantages of open captions, there also are disadvantages. Some
disadvantages stem from the fact that open captions are an actual part of the video
stream, whereas closed captions exist as a separate text stream. If captions are
preserved as text, users potentially can archive and index video content and allow
users to search for specific video content within these archives; this ability is lost
with open captions. Also, open captions, unlike closed captions, are subject to loss
of quality when the encoded video is compressed.
With the mix of advantages and disadvantages of open and closed captioning, it is
important for the video producer to evaluate the use of the video product and make
an informed decision about what type of captioning to use. For example, if a
training videotape is specifically designed for individuals with disabilities or for large
audiences or for use in noisy conference exhibits, open captioning might be a good
choice. The most important decision is to choose to caption the product; the choice
to make it open-captioned or closed-captioned should occur after consideration of
all factors regarding its use.
What is the correct use of the Caption tag when used with the
Figure tag?
As you've advised me, information is available on this question at the AcceDe PDF Project
website :

http://www.pdf-accessible.com/en/

I downloaded the resource called 'Making PDF documents accessible with Adobe Acrobat
Pro'.

I was concerned that if a Caption tag is used inside a Figure tag, then the alternative text of
the Figure tag would suppress the Caption tag and screen readers users would not hear the
caption.

The manual states on page 54:

"When a Figure tag contains a text-type content item (such as a caption), this is not replaced
by the alternate text of the image (this is the only tag which operates in this way). So,
screen readers will read the alternate text of the image and then the caption."

However, I've tested this in the latest versions of Jaws and NVDA and neither screen reader
reads the Caption tag when it is a child of a Figure tag.

This is consistent with the behavior of the Figure/Caption button in Adobe Acrobat, which
deletes the existing alt text of a Figure. If this is intentional, then presumably it's so it will
not suppress the reading of the Caption tag.

So my question is: Is the AcceDe information correct? Can it be confirmed from a primary
standards document?

And in a real-world context, even if this is the correct syntax, would you recommend using
this syntax when both NVDA and Jaws do not interpret it as intended?

These are tag constructions that are used in many PDF documents. I would be concerned if
users of the best screen readers available are not hearing any figure captions.

Difference between Image and


Picturebox in VB
2 posts / 0 new
Log in to post comments
Last post
#11 April, 2012 - 13:30
Karthik
Difference between Image and Picturebox in VB
What is the difference between Image Control and Picture Box control in Visual
Basic (VB) ?

Log in to post comments

#22 April, 2012 - 08:34


Divya

picture box:

1) it act as container control


2) use of memory to store the picture
3) editing of picture is possible in picture box
4) having auto size property
5) not having stretch property

Image Control:

1) it is not act as container control


2) not use of memory to store the picture
3) editing of picture is not possible in picture box
4) Not having auto size property
5) Having stretch property

Main Difference:
The Image control is a lightweight control that has no device context (or hDC) or
it's own. The Picturebox does have a device context and hDC and is a true
"window" from the point of view of the Windows operating system (and can
directly use "hWnd" parameter API calls).

Due to this difference, an Image control can display a gif file loaded into the
picture property with a transparent background, while a picturebox does not. The
Picturebox, however, doesn't "flicker" when moved at runtime like an Image
control does. This difference also has implications for layering -- a lighweight
control (like the Image control) can only be z-ordered (layered) over another
lighweight control --but never over a true window like the Picturebox control. The
Image control is also "lightweight" in terms of it's memory footprint (versus the

Picturebox control which is "heavier" even without the extra memory backbuffer
that is reserved with its AutoRedraw property set to True) --although with the
amount of memory available in most modern computers, this doesn't usually
make this much of a difference, but it might come into play with large control
arrays containing large graphics that would force paging out to virtual memory
(which, in turn, could effect the speed of game graphics).

An Image control has Stretch property, a Picturebox control does not.

Picturebox control has an AutoSize property, an Image control does not.

However code workarounds can substitute for these two missing properties in
either/both.

Both controls use a StdPicture object to store graphics and so Picture.Render


and LoadPicture/SavePicture will work with both (but PaintPicture only works
with the Picturebox control).

A Picturebox control is a container control, an Image control is not.


A Picturebox control also has a whole bunch of properties that an Image Control
does not - BackColor, FillColor, FillStyle, etc.

The long and short of it [IMHO] is that the PictureBox control is the more
generally useful of the two controls and used in conjunction with PaintPicture or
the Bitblt/Stretchblt/AlphaBlend APIs can do just about anything you could want
with graphics.

DirectX surfaces may be slight faster way of manipulating graphics, but when
using Direct Memory Access (DMA) pixel manipulation techniques with
Picturebox control graphics --it can be relatively quick..and works even with
older non-Directx compatible video cards/systems.

Possible Difference between Image Box


and Picture Box Control
Posted on August 28, 2011 by k10blogger
Difference between Image box and Picture Box control.

Image Box Picture Box


1) it is not act as container control 1) it act as container control
2) not use of memory to store the picture 2) use of memory to store the picture

3) editing of picture is not possible in picture box 3) editing of picture is possible in picture box

4) Not having auto size property 4) having auto size property

5) Having stretch property 5) not having stretch property

The imagebox can only contain images, whereas the picturebox can also, besides images,
contain other controls like buttons, etc.
Also the imagecontrol is a light control, like a label, which means that i doesn't have a
handle, and therefore technical isn't a window like other controls. Its therefore less resource
demanding, and best used when you just have an image that needs stretching, etc.

So if you just need to show an image, use the imagebox, otherwise use the picturebox.

picturebox can be used as a container

PictureBox And Image Controls In Visual Basic 6


Both PictureBox and Image controls let you display an image, so let's compare them and see when it
makes sense to choose one or the other.

The PictureBox Control


PictureBox controls are among the most powerful and complex items in the Visual Basic Toolbox window.
In a sense, these controls are more similar to forms than to other controls. For example, PictureBox
controls support all the properties related to graphic output, including AutoRedraw, ClipControls, HasDC,
FontTransparent, CurrentX, CurrentY, and all the Drawxxxx, Fillxxxx, and Scalexxxx properties.
PictureBox controls also support all graphic methods, such as Cls, PSet, Point, Line, and Circle and
conversion methods, such as ScaleX, ScaleY, TextWidth, and TextHeight. In other words, all the
techniques that I described for forms can also be used for PictureBox controls (and therefore won't be
covered again in this section).

Loading images

Once you place a PictureBox on a form, you might want to load an image in it, which you do by setting the
Picture property in the Properties window. You can load images in many different graphic formats,
including bitmaps (BMP), device independent bitmaps (DIB), metafiles (WMF), enhanced metafiles
(EMF), GIF and JPEG compressed files, and icons (ICO and CUR). You can decide whether a control
should display a border, resetting the BorderStyle to 0-None if necessary. Another property that comes
handy in this phase is AutoSize: Set it to True and let the control automatically resize itself to fit the
assigned image.

You might want to set the Align property of a PictureBox control to something other than the 0-None
value. By doing that, you attach the control to one of the four form borders and have Visual Basic
automatically move and resize the PictureBox control when the form is resized. PictureBox controls
expose a Resize event, so you can trap it if you need to move and resize its child controls too.

You can do more interesting things at run time. To begin with, you can programmatically load any image in
the control using the LoadPicture function:

Picture1.Picture = LoadPicture("c:\windows\setup.bmp")

and you can clear the current image using either one of the following statements:

' These are equivalent.


Picture1.Picture = LoadPicture("")
Set Picture1.Picture = Nothing
The LoadPicture function has been extended in Visual Basic 6 to support icon files containing multiple
icons. The new syntax is the following:

LoadPicture(filename, [size], [colordepth], [x], [y])

where values in square brackets are optional. If filename is an icon file, you can select a particular icon
using the size or colordepth arguments. Valid sizes are 0-vbLPSmall, 1-vbLPLarge (system icons whose
sizes depend on the video driver), 2-vbLPSmallShell, 3-vbLPLargeShell (shell icons whose dimensions
are affected by the Caption Button property as set in the Appearance tab in the screen's Properties dialog
box), and 4-vbLPCustom (size is determined by x and y). Valid color depths are 0-vbLPDefault (the icon
in the file that best matches current screen settings), 1-vbLPMonochrome, 2-vbLPVGAColor (16 colors),
and 3-vbLPColor (256 colors).

You can copy an image from one PictureBox control to another by assigning the target control's Picture
property:

Picture2.Picture = Picture1.Picture

The PaintPicture method

PictureBox controls are equipped with a very powerful method that enables the programmer to perform a
wide variety of graphic effects, including zooming, scrolling, panning, tiling, flipping, and many fading
effects: This is the PaintPicture method. (This method is also exposed by form objects, but it's most often
used with PictureBox controls.) In a nutshell, this method performs a pixel-by-pixel copy from a source
control to a destination control. The complete syntax of this method is complex and rather confusing:

DestPictBox.PaintPicture SrcPictBox.Picture, destX, destY, [destWidth], _


[destHeight], [srcX], [srcY2], [srcWidth], [srcHeight], [Opcode])

The only required arguments are the source PictureBox control's Picture property and the coordinates
inside the destination control where the image must be copied. The destX / destY arguments are
expressed in the ScaleMode of the destination control; by varying them, you can make the image appear
exactly where you want. For example, if the source PictureBox control contains a bitmap 3000 twips wide
and 2000 twips tall, you can center this image on the destination control with this command:

picDest.PaintPicture picSource.Picture, (picDest.ScaleWidth - 3000) / 2, _


(picDest.ScaleHeight - 2000) / 2

In general, Visual Basic doesn't provide a way to determine the size of a bitmap loaded into a PictureBox
control. But you can derive this information if you set the control's AutoSize property to True and then
read the control's ScaleWidth and ScaleHeight properties. If you don't want to resize a visible control just
to learn the dimensions of a bitmap, you can load it into an invisible control, or you can use this trick,
based on the fact that the Picture property returns an StdPicture object, which in turn exposes the Height
and Width properties:

' StdPicture's Width and Height properties are expressed in


' Himetric units.
With Picture1
width = CInt(.ScaleX(.Picture.Width, vbHimetric, vbPixels))
height = CInt(.ScaleY(.Picture.Height, vbHimetric, _
vbPixels))
End With
By the way, in all subsequent code examples I assume that the source PictureBox control's ScaleWidth
and ScaleHeight properties match the actual bitmap's size. By default, the PaintPicture method copies the
entire source bitmap. But you can copy just a portion of it, passing a value for srcWidth and srcHeight:

' Copy the upper left portion of the source image.


picDest.PaintPicture picSource.Picture, 0, 0, , , , , _
picSource.ScaleWidth / 2, picSource.ScaleHeight / 2

If you're copying just a portion of the source image, you probably want to pass a specific value for the
srcX and srcY values as well, which correspond to the coordinates of the top-left corner of the area that
will be copied from the source control:

' Copy the bottom-right portion of the source image


' in the corresponding corner in the destination.
wi = picSource.ScaleWidth / 2
he = picSource.ScaleHeight / 2
picDest.PaintPicture picSource.Picture, wi, he, , , wi, he, wi, he

You can use this method to tile a target PictureBox control (or form) with multiple copies of an image
stored in another control:

' Start with the leftmost column.


x = 0
Do While x < picDest.ScaleWidth
y = 0
' For each column, start at the top and work downward.
Do While y < picDest.ScaleHeight
picDest.PaintPicture picSource.Picture, x, y, , , 0, 0
' Next row
y = y + picSource.ScaleHeight
Loop
' Next column
x = x + picSource.ScaleWidth
Loop

Another great feature of the PaintPicture method lets you resize the image while you transfer it, and you
can even specify different zoom-in and zoom-out factors for the x- and y-axes independently. You just
have to pass a value to the destWidth and destHeight arguments: If these values are greater than the
source image's corresponding dimensions, you achieve a zoom-in effect, and if they are less you get a
zoom-out effect. For example, see how you can double the size of the original image:

picDest.PaintPicture picSource.Picture, 0, 0, _
picSource.ScaleWidth * 2, picSource.ScaleHeight * 2

As a special case of the syntax of the PaintPicture method, the source image can even be flipped along
its x-axis, y-axis, or both by passing negative values for these arguments:

' Flip horizontally.


picDest.PaintPicture picSource.Picture, _
picSource.ScaleWidth, 0, -picSource.ScaleWidth
' Flip vertically.
picDest.PaintPicture picSource.Picture, 0, _
picSource.ScaleHeight, , -picSource.ScaleHeight
' Flip the image on both axes.
picDest.PaintPicture picSource.Picture, picSource.ScaleWidth, _
picSource.ScaleHeight, -picSource.ScaleWidth, -picSource.ScaleHeight

As you might expect, you can combine all these effects together, magnifying, reducing, or flipping just a
portion of the source image, and have the result appear in any point of the destination PictureBox control
(or form). You should find no problem in reusing all those routines in your own applications.

As if all these capabilities weren't enough, we haven't covered the last argument of the PaintPicture
method yet. The opcode argument lets you specify which kind of Boolean operation must be performed
on pixel bits as they're transferred from the source image to the destination. The values you can pass to
this argument are the same that you assign to the DrawMode property. The default value is 13-
vbCopyPen, which simply copies the source pixels in the destination control. By playing with the other
settings, you can achieve many interesting graphical effects, including simple animations.

The Image Control


Image controls are far less complex than PictureBox controls. They don't support graphical methods or
the AutoRedraw and the ClipControls properties, and they can't work as containers, just to hint at their
biggest limitations. Nevertheless, you should always strive to use Image controls instead of PictureBox
controls because they load faster and consume less memory and system resources. Remember that
Image controls are windowless objects that are actually managed by Visual Basic without creating a
Windows object. Image controls can load bitmaps and JPEG and GIF images.

When you're working with an Image control, you typically load a bitmap into its Picture property either at
design time or at run time using the LoadPicture function. Image controls don't expose the AutoSize
property because by default they resize to display the contained image (as it happens with PictureBox
controls set at AutoSize = True). On the other hand, Image controls support a Stretch property that, if
True, resizes the image (distorting it if necessary) to fit the control. In a sense, the Stretch property
somewhat remedies the lack of the PaintPicture method for this control. In fact, you can zoom in to or
reduce an image by loading it in an Image control and then setting its Stretch property to True to change
its width and height:

' Load a bitmap.


Image1.Stretch = False
Image1.Picture = LoadPicture("c:\windows\setup.bmp")
' Reduce it by a factor of two.
Image1.Stretch = True
Image1.Move 0, 0, Image1.Width / 2, Image1.Width / 2

Image controls support all the usual mouse events. For this reason, many Visual Basic developers have
used Image controls to simulate graphical buttons and toolbars. Now that Visual Basic natively supports
these controls, you'd probably better use Image controls only for what they were originally intended.

OLE control in Visual Basic


6.0
Filed under PROGRAMMING IN VISUAL BASIC
Insertable Objects (like the Excel Worksheet object; with a list of the
employees, or a Project Calendar object having the scheduling information for a
project.) These can be added to the toolbox, so they can be considered controls.
OLE (Object Linking and Embedding) is a means to interchange data between
applications. One of the primary uses of the OLE Container control was to
embed Word documents or Excel spreadsheets in a form. This is the control to
use when you want to link or embed an object into your Visual Basic application.
1. From the Windows Start menu, choose Programs, Microsoft Visual
Studio 6.0, and then Microsoft Visual Basic 6.0.
2.Click the OLE tool form toolbox.

3. Double clicking the OLE control on your form will activate the objects
application. Visual Basic also allows you to activate the object from your code.A
Insert dialogbox is open.There are two option create new or create from file.you
select it as you want .

4. First we create new Object .


5. Select Create New and Microsoft office Excel Chart from the Object
Type list.

6. Creating a Excel chart will allow you to access the Excel application to define
the chart.

7. Select the Excel chart.


8.Run your application. Double click on the OLE control and use it in your
project as you want.

Second is Linking to an existing object for this:


1. Add a OLE to the form.

2. Select Create from File and use the Browse button to find the Word
document .

3. Select Link and click on OK.


4. This Word document page has been sized so that it will fit onto a form.
Change the SizeMode property of the OLE control to Stretch.

5. Run your application. Double click the OLE control to see that Word is
activated with the selected document opened.

6. Close Word and stop your application.

What is the difference between a label and a text


box in Visual Basic?
Edit

Last edited by 182.69.203.34

Label displays text on the form which cannot be edited by the user during run
time.only we can change the caption over the label by using its caption property.
Textbox displays text and also accept user input from keyboard.It alows to edit
the text within it

LESSON 4 - How to use the VB standard controls


Friday, June 09, 2017

For this lesson we will need a new Project, call it Lesson4.vbp, which will only be
used to create and try out various controls.

To refresh your memory, since the previous two lessons have been rather
theoretical, you select the New tab, and Standard EXE for the type. As soon as The
Form opens, you Save the new Project, give the Form a name, let's say it's
Lesson4.frm and then you give the Project a name: Lesson4.vbp. Note that you
do not have to specify the extensions, .frm and .vbp, because they will be assigned
automatically.

The Form

We covered it too briefly in Lesson 01 so we'll go over it again.


The Form is the first object you see when you Open the application. It's the window
into which all the controls will appear, where you will input data and see results.

There's not too much you can do with the form at this time. Basically, you adjust
the BackColor and the StartUpPosition (where it will open on the screen when
you Run it) and then you start putting controls on it.

The Label

This is probably the first control you will master. It is used to display static text,
titles and screen output from operations. The important properties to remember:

Caption - the text that is displayed in the label

BackColor and ForeColor - colors of the background and the text

BackStyle - Opaque or Transparent - whether the background is


visible or not

Font - font and size of text

Alignment - text centered, left or right


Multiline- True or False - if True, you can have several lines of
text, delimited by <CR> in the label - by default, it is set to
False

Frame & PictureBox

When you want to group several controls together - name and address, for example
- you use a Frame. The frame backcolor can be the same as the form's and only
the frame borders will be obvious, or it can be a different color and stand out.

You create the frame before the controls. When you create controls in a frame, they
are tied to the frame and move with it. The frame caption is the text that appears
at the top of the frame - you use it to define the group.

The PictureBox is like a Label with a picture in it instead of text. The Picture
property determines the name of the file, .BMP or .GIF, that will be displayed. It
can be used for a company logo, etc.
Top

TextBox & CommandButton

The TextBox is like a Label but, it is used to input data into the program. The data
typed in is in the Text property of the control.

When the program is Run, only the controls that can be manipulated will be
activated. For example, if the form contains 3 Labels, 3 TextBoxes and 3 Buttons,
when it is Run, the cursor will not stop at the labels.

When the user hits the Tab key, the cursor will go to the first TextBox or Button -
not necessarily the first one on the form but, the first one that was created. That is
called the Tab order and you have to specify it.

On the form there is only one control at any given time that has the cursor on it - it
is said to have Focus. If you type data, the control with Focus will receive it. You
change the Focus with Tab or by clicking on a different control.

Up until now we haven't bothered with the names of controls (the


Name property). Once we start to code, however, it does become
important. There are all kinds of occasions in code where you have
to call upon a certain control. It can get very confusing when your
12 buttons are called Command1...Command12. What did
Command7 do, again? Give each control a name (except for titles,
etc. that you never refer to) so that you will be able to identify it
easily. It is recommended that you use a prefix when assigning a
name; cmd for a CommandButton, lbl for a Label, txt for a
TextBox. Thus, txtNumber where you input the value can be
distinguished from lblNumber where you display the result.

The CommandButton is used to initiate actions, usually by clicking on it. The


Caption property determines the text to display on the face of the button.
The Default property, if set to true, means that the button will be activated (same
as Clicked) if the <Enter> key is hit anywhere in the form. If Cancel is set to True,
the button will be activated from anywhere in the form by the <Esc> key.

Hopefully, you have now run this program several times, each time you added a
new control, in fact. Admittedly, nothing much happened except to confirm that the
controls were appearing in the right place on the form.

Here now is an example of the code we could write to perform simple tasks: input
name and city and display the information in a label when the Continue button is
clicked. The Exit button will end execution of the program and the Cancel button (or
the Esc key) will clear the fields.
A few explanations: the Form_Load event occurs when the form first opens. This is
where we initialize things - we want the TextBoxes and the result Label to be empty
when we start off so, we set them to a blank space.

The actual processing is done after the data have been entered and we hit the
Continue button. The processing logic is put in the Continue_button_clicked event.

When you hit the <Esc> key or you click on the Cancel button, you want to annul
the entry you're doing and start over again. That's the same as opening the form
so, we just tell the program to execute the Form_Load procedure which we already
have.

The Exit button uses the pronoun Me to Unload. Me means the form currently
active without having to name it.

Top
Multiple forms

For the next series of examples we will use a new Form. It is not
necessary to create a new Project; any Project can have several
Forms in it.

With the Project open on the current Form, go to: Menu --> Project
--> Add form. Select New form in the creation window and, voila!
Next time you save the Project, it will ask you to name this new
Form. You can name it Lesson4B.frm for example.

One more detail: when you Run the Project, you want to tell it
which Form to open.

Go to the Project Manager window, right click on the Project


name and select Project properties. In the Project properties
window, the ListBox on the right says "Startup object". Select the
Form you want to open when you Run. You can change the Startup
object at any time to run the different forms that you created.

Check boxes & Option buttons

These two controls are used when the user must choose from a list of options. The
difference between the two is that with Check boxes he can select several at one
time but, with Option buttons, he must select only one among several.

The example below illustrates the use of Check boxes and Option buttons. To
capture the information entered by means of these controls, you must test
the property: Value. In a Check box, Value = 1 if box is checked and = 0 if
not. In an Option button, Value = True if selected and = False if not.
The code, although somewhat long, is not very complicated. Most of the time,
processing consists of checking the content of .Value. It is fairly standard
procedure, especially with Option buttons, to ensure that at least one button has
been selected and to display an error message if it has not.
Assignment 3

Create the Payroll form shown below. Number of hours must be entered as well as
the appropriate rate. Gross salary = rate * hours. Net salary = gross salary -
deductions.

Potrebbero piacerti anche