What is Visual Basic?

Introduction

Visual Basic is a programming language. It started out as a very simple one (called BASIC) in the days of dos and early windows/macs. As it evolved, and other languages were developed, it was usually relegated to first-time programmers. It is still recommended as a Beginners first language, but it has come on a lot since it was first released, and is often chosen over C++ because of the speed at which professional applications can be created using it. The major jump was from 16 bit to 32 bit in VB5 (you could also buy a 32 bit version of VB4). Visual Basic 6 was released late in 1998. Below is some sample code, one in C++ (the language windows is written in) and one in VB. As you can see, VB is plain language. Both examples do the same thing:

Visual Basic

Sub Command1_Click()
    If Text1.Text = "" Then
        Msgbox "You did not enter anything"
    Else
        Msgbox "You entered " & Text1.Text
    End If
End Sub

VC++

void CTestDlg::OnBtnTest()
{
    CString szMessage;
    CString szEdit;
    m_editText.GetWindowText (szEdit);
    if ( szEdit == "" )
    {
        AfxMessageBox( "You entered nothing!" );
    }
    else
    {
        szMessage.Format( "You entered the text '%s'", szEdit);
        AfxMessageBox( szMessage , MB_ICONINFORMATION);
    }
}

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why.”