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);
}
}
Comments