Visual Basic facts for kids
Paradigm | Object-based and Event-driven |
---|---|
Developer | Microsoft |
First appeared | 1991 |
Stable release |
6.0 / 1998
|
Typing discipline | Static, strong |
OS | Microsoft Windows and MS-DOS |
Major implementations | |
Microsoft Visual Studio | |
Influenced by | |
BASIC | |
Influenced | |
Visual Basic .NET, Gambas, REALbasic and Basic4ppc |
Visual Basic (VB) is a programming language created by Microsoft. It was designed to work on their operating system, Windows. People often say that the BASIC language is easier to read than many other programming languages.
Visual Basic is a popular and easy-to-understand programming language. It uses simple English-like words and rules (called syntax). It's an "interpreted" language, which means you can run your code right after you write it.
Having an interpreter makes it simpler to use. You don't need a special program called a compiler to turn your code into something the computer understands first. This means you can test your code quickly. Once your code works, you can turn it into an .exe file. This file will then run on any modern Windows computer, even if Visual Basic isn't installed there. Visual Basic helps new programmers create professional-looking Windows programs. It has drawing tools to design common Windows screens. It also has advanced features for making programs work with the internet.
Contents
Code Examples: What Can Visual Basic Do?
Visual Basic lets you create programs that interact with users. Here are a couple of examples showing how it works.
This code asks you how old you are. It then checks if your answer is a number and gives you a message based on your age.
Dim MyInput
MyInput = InputBox("How old are you?")
If Not IsNumeric(MyInput) Then
MsgBox "That's not a number!"
ElseIf MyInput < 0 Then
MsgBox "You cannot be less than zero!"
ElseIf MyInput > 100 Then
MsgBox "That's old!"
Else
MsgBox "You're " & MyInput & " years old."
End If
This simple code will show a small window with the words "Hello, World" when the program starts.
Private Sub Form_Load()
MsgBox "Hello, World"
End Sub
History: How Visual Basic Started
Visual Basic 1.0 was first released in 1991. Its design, where you can drag and drop items to create the user interface, came from a tool called Tripod. This tool was made by Alan Cooper and his company. Microsoft worked with Cooper to turn Tripod into a system for Windows 3.0. They called it Ruby.
Ruby didn't have a programming language itself. Microsoft decided to combine Ruby with the BASIC language. This is how Visual Basic was born. The "visual" part came from Ruby, and the "Basic" part came from Microsoft's "EB" (Embedded BASIC) engine. This new tool made it easy to build programs by seeing what they would look like as you built them.
Visual Basic Versions Over Time
Here's a look at the different versions of Visual Basic:
Name | Operating System | Date Released | What's New? |
---|---|---|---|
Visual Basic 1.0 | Windows | May 1991 | This was the very first version, shown at a big trade show. |
Visual Basic 1.0 | DOS | September 1992 | This version worked on DOS computers. It looked like a graphical interface, but used text characters. |
Visual Basic 2.0 | Windows | November 1992 | This version was faster and easier to use. It introduced ideas that led to "class modules" later on. |
Visual Basic 3.0 | Windows | Summer 1993 | This version became very popular. It could work with databases. |
Visual Basic 4.0 | Windows | August 1995 | This was the first version that could make programs for 32-bit Windows. It also introduced OLE controls, which later became ActiveX controls. |
Visual Basic 5.0 | Windows | February 1997 | This version was only for 32-bit Windows. It allowed programmers to create their own custom controls and make faster programs. |
Visual Basic 6.0 | Windows | Mid 1998 | This version added new features, like making web-based programs. Microsoft stopped supporting it in 2008, but its core parts still work on newer Windows versions. |
Visual Basic .NET: The Next Generation
Visual Basic .NET is the newer version of Microsoft's Visual Basic products. It makes creating programs even easier. You can drag and drop different parts (called controls) into your program. It runs on something called the .NET Framework.
Visual Basic for Applications (VBA)
This is a special version of Visual Basic used inside programs like Microsoft Office. It's based on Visual Basic 6.0. VBA lets you automate tasks within Office programs, like changing data in a spreadsheet or writing information to a file.
Support for Visual Basic
Most older versions of Visual Basic (from 1.0 to 6.0) are no longer officially supported by Microsoft. This means they don't get regular updates or help from Microsoft. However, the main parts of Visual Basic 6.0 can still run on newer Windows versions like Windows 10.
Even though official support has ended, many programmers still use Visual Basic 6.0. They can install and use it on Windows XP, Windows Vista, and Windows 2003.