0% found this document useful (0 votes)
21 views

Computer Visual Basic Research

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Computer Visual Basic Research

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Research on Visual Basic

The Creator: Alan Cooper

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. Alan
Cooper (born June 3, 1952) is an American software designer and programmer. Widely recognized as the
"Father of Visual Basic",[1] Cooper is also known for his books About Face: The Essentials of Interaction
Design and The Inmates Are Running the Asylum: Why High-Tech Products Drive Us Crazy and How to
Restore the Sanity. Alan Cooper grew up in Marin County, California, United States where he attended
the College of Marin, studying architecture. He learned programming and took on contract programming
jobs to pay for college. In 1975, soon after he left college and as the first microcomputers became
available, Alan Cooper founded his first company, Structured Systems Group (SSG), in Oakland,
California, which became one of the first microcomputer software companies. SSG's software accounting
product, General Ledger, was sold through ads in popular magazines such as Byte and Interface Age. On
April 28, 2017, Alan was inducted into the Computer History Museum's Hall of Fellows "for his
invention of the visual development environment in Visual BASIC. During the 1980s, Alan Cooper
authored several business applications including Microphone II for Windows and an early, critical-path
project management program called SuperProject. Cooper sold SuperProject to Computer Associates in
1984, where it achieved success in the business-to-business marketplace. In 1988, Alan Cooper created a
visual programming language (code-named “Ruby”) that allowed Windows users to build “Finder” like
shells. He called it a shell construction set. After he demonstrated Ruby to Bill Gates, Microsoft
purchased it. At the time, Gates commented that the innovation would have a “profound effect” on their
entire product line. Microsoft initially decided not to release the product as a shell for users, but rather to
transform it into a professional development tool for their QuickBASIC programming language called
Visual Basic, which was widely used for business application development for Windows computers. In
2017, Cooper became part of Designit, a strategic design arm of Wipro Digital. Cooper Professional
Education continued to exist as a teaching and learning division of Designit until it closed its doors to
business on May 29, 2020.

Visual Basic and it’s syntax


Visual Basic is a name for a family of programming languages from Microsoft. It may refer to Visual
Basic .NET, Visual Basic (classic), Embedded Visual Basic, Visual Basic for Applications. VBScript.
Visual Basic for Applications is a computer programming language developed and owned by Microsoft.
With VBA you can create macros to automate repetitive word- and data-processing functions, and
generate custom forms, graphs, and reports. Keywords in Visual Basic, Catch (Visual Basic .NET
statement), CBool (Data-conversion function), CByte (Data-conversion function), CChar (Data-
conversion function) and many more. In Visual Basic, NET, keywords are reserved, they cannot be used
as tokens for such purposes as naming variables and subroutines. The syntax in a Visual Basic Help topic
for a method, function, or statement shows all the elements necessary to use the method, function, or
statement correctly. The examples in this topic explain how to interpret the most common syntax
elements.

Activate method syntax object.Activate


In the Activate method syntax, the italic word "object" is a placeholder for information you supply—in this
case, code that returns an object. Words that are bold should be typed exactly as they appear. For
example, the following procedure activates the second window in the active document.

Sub MakeActive()

Windows(2).Activate

End Sub

Dim statement syntax Dim varname [([ subscripts ])] [ As type, ] [ varname [([ subscripts ])] [ As type ]]
...

In the Dim statement syntax, the word Dim is a required keyword. The only required element
is varname (the variable name).

For example, the following statement creates three variables: myVar, nextVar, and thirdVar. These
are automatically declared as Variant variables.

Dim myVar, nextVar, thirdVar

The following example declares a variable as a String. Including a data type saves memory and can help
you find errors in your code.

Dim myAnswer As String

To declare several variables in one statement, include the data type for each variable. Variables declared
without a data type are automatically declared as Variant.

Dim x As Integer, y As Integer, z As Integer


In the following statement, x and y are assigned the Variant data type. Only z is assigned the Integer
data type.

Dim x%, y%, z as Integer

The shorthand for the types is: % -integer; & -long; @ -currency; # -double; ! -single; $ -string

If you are declaring an array variable, you must include parentheses. The subscripts are optional. The
following statement dimensions a dynamic array, myArray.

Dim myArray()

MsgBox function syntax MsgBox (prompt, [ buttons, ] [ title, ] [ helpfile, context ])


In the MsgBox function syntax, the italic words are named arguments of the function. Arguments enclosed in brackets
are optional. (Do not type the brackets in your Visual Basic code.) For the MsgBox function, the only argument you
must provide is the text for the prompt.

Arguments for functions and methods can be specified in code either by position or by name. To specify arguments
by position, follow the order presented in the syntax, separating each argument with a comma, for example

MsgBox "Your answer is correct!",0,"Answer Box"

To specify an argument by name, use the argument name followed by a colon and an equal sign (:=), and the
argument's value. You can specify named arguments in any order, for example

MsgBox Title:="Answer Box", Prompt:="Your answer is correct!"

The syntax for functions and some methods shows the arguments enclosed in parentheses. These functions and
methods return values, so you must enclose the arguments in parentheses to assign the value to a variable. If you
ignore the return value or if you don't pass arguments at all, don't include the parentheses. Methods that don't return
values don't need their arguments enclosed in parentheses. These guidelines apply whether you are using positional
arguments or named arguments.

In the following example, the return value from the MsgBox function is a number indicating the selected button that
is stored in the variable myVar. Because the return value is used, parentheses are required. Another message box then
displays the value of the variable.

Sub Question()

myVar = MsgBox(Prompt:="I enjoy my job.", _

Title:="Answer Box", Buttons:="4")

MsgBox myVar

End Sub
Option Compare statement syntax Option Compare { Binary | Text | Database }
In the Option Compare statement syntax, the braces and vertical bar indicate a mandatory choice between three
items. (Do not type the braces in the Visual Basic statement). For example, the following statement specifies that
within the module, strings will be compared in a sort order that is not case-sensitive.

Option Compare Text

Programs developed by Visual Basic and it’s advantages and disadvantages

Visual Basic for Applications runs as an internal programming language in Microsoft Office (MS Office,
Office) applications such as Access, Excel, PowerPoint, Publisher, Word, and Visio. The most popular
type of Visual Basic in use today is VBA. VBA is a version of Visual Basic that can be used to program
Microsoft Office apps, such as Excel and PowerPoint. Its advantage is that Visual Basic is an event-
driven programming language and environment from Microsoft that provides a graphical user interface
(GUI) which allows programmers to modify code by simply dragging and dropping objects and defining
their behavior and appearance, It is particularly easy to develop graphical user interfaces and to connect
them to handler functions provided by the application, and its disadvantage are that it cannot handle
pointers directly. This is a significant disadvantage since pointers are much necessary for programming.
Any additional coding will lead to many CPU cycles, requiring more processing time, also These
languages require computers with more memory, high storage capacity of hard disk, and faster processor.
These languages can only be implemented on graphical operating systems like Linux and windows. The
execution speed of visual applications is slow.

You might also like