Beruflich Dokumente
Kultur Dokumente
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.
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
High quality systems will be delivered because of methodology, tools and user involvement
Standards and consistency can be enforced through the use of CASE tools
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
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 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
Example of RAD
This resource provides a simple example of RAD development using several different 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.
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.
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.
Core activities
Requirements
Design
Construction
Testing
Debugging
Deployment
Maintenance
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
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
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 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]
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]
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.
Business Modeling
Data Modeling
Process Modeling
Application Generation
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 the user will be involved all through the life cycle
When budget is high enough to afford designers for modeling along with the
cost of automated tools for code generation
It is useful when you have to reduce Not all application is compatible with
the overall project risk RAD
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
Post a Comment
1. Time consuming
2. Never backward (Traditional)
3. Little room for iteration
4. Difficulty responding to changes
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?
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:
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.
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:
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.
Users better prepared for later stages of development due to familiarity with
prototype.
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
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]:
Working prototypes may lead management and customers to believe that the final product
is almost ready for delivery.
Prototypes generally lack security, auditing, and other controls, and data
integrity may be difficult to ensure.
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.
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.
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.
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] :
*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]
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:
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.
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.
Drawing software
Demo makers
"Visual" RAD tools such as Optima++, Borland Delphi, and Visual Basic
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.
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]:
A rigidly paced schedule that defers design improvements to the next product
version
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.
Conclusion
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.
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.
Declaration Syntax
The syntax for declaring a Function procedure is as follows:
VBCopy
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
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
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
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.
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.
The following Function procedure calculates the longest side, or hypotenuse, of a right
triangle, given the values for the other two sides.
VBCopy
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
Website msdn.microsoft.com/en-us/vstudio/ms788229.aspx
Major implementations
BASIC
Influenced
Contents
[hide]
1Language features
2Characteristics
3History
o 3.1Timeline
3.1.11990s
3.1.22000s
4Derivative languages
5Performance and other issues
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.
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.
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
Constraint
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
Literate
Procedural
Inductive programming
Language-oriented
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
Block-structured
Object-oriented
Actor-based
Class-based
Concurrent
Prototype-based
By separation of concerns:
Aspect-oriented
Role-oriented
Subject-oriented
Recursive
v
t
e
Contents
[hide]
1Event handlers
o 1.2Exception 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.
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.
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
2. It derives from the much older BASIC programming language, and so is considered useful and
easy programming language for the beginner to learn.
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.
0 COMMENTS
elements of the Windows user interface. The Text. Box control is the
made up of one or more forms usually more than one. The benefit of
//visualbasic.
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
code to see the full sample. I have Adobe Acrobat 9.0 Standard. I
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
button the user clicked. Error ans handling debugging tutorial for
for beginners.
Explained with examples and source code.
easy to learn, fun and powerful! The current tutorials are all tested
Menu Bar
Tool Bar
Project Explorer
Properties 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.
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.
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.
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.
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 .
This example changes the background colour of the form using the BackColor property.
This example is to change the control's Shape using the Shape property. This code will
change the shape to a circle at runtime.
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.
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
Figure 3.3
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.
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.
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")
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
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
Combo1.AddItem "Item1"
Combo1.AddItem "Item2"
Combo1.AddItem "Item3"
Combo1.AddItem "Item4"
End Sub
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
End Sub
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
End Sub
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
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
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
Abhimanyu K Vatsa
Nov 10 2012
Article
57.4k
google Plus
o
o
Expand
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
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
The following are guidelines for choosing the right type of deployment project for your
project.
applications.
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.
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.
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
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
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
Next >>
8.If you want to change the Manufactures name, just right click the project go to
properties
Change the properties as per you requirement
11. Select the Release folder for build. (Select Properties in right click of Setup Project)
12. Set the Compression Mode
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
a. Users Desktop
Step4: Select Users Desktop or Users Program Menu and right click on right side
pane
Step7: Here the sample product name is Your Product Name for demo purpose
Kindly follow the same steps for shortcut added in Users Program Menu.
If you want to add your icon in Control Panel > Programs >Uninstall, You need to follow
Step 1: Select the setup project in Solution Explorer and right click, select the
properties
Install your setup in target machine, You can view the shortcuts in Desktop, Start Menu
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
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
Right click of desired screen which you need to move the specific place and select
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.
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
multiple instance
if (process.Length > 1)
MessageBoxButtons.OK, MessageBoxIcon.Information);
Application.Exit();
else
{
Application.Run(new <Initial Form>());
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.
"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.
picture box:
Image Control:
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).
However code workarounds can substitute for these two missing properties in
either/both.
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.
3) editing of picture is not possible in picture box 3) editing of picture is possible in picture box
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.
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:
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
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:
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:
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:
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:
You can use this method to tile a target PictureBox control (or form) with multiple copies of an image
stored in another control:
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:
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.
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:
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.
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 .
6. Creating a Excel chart will allow you to access the Excel application to define
the chart.
2. Select Create from File and use the Browse button to find the Word
document .
5. Run your application. Double click the OLE control to see that Word is
activated with the selected document opened.
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
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
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:
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
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.
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.
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.