TechnologyUK - Programming (VB6) Logo

Visual Basic 6

BASIC was not originally considered to be a professional programming language. The Professional Edition of Visual Basic 6, however, has all the tools that a programmer needs, including ActiveX controls. VB provides much of the code required to create the user interface, unlike a non-visual programming language. In earlier versions of basic, up to 80% of the programmer's time was spent coding the user interface. The ability to easily and quickly create a user interface with the built-in features of VB also results in a standardised interface for Windows applications.

Other programming languagues have also adopted a visual IDE (integrated development environment) strategy, including Visual C and Delphi. Delphi is very similar to VB, although it creates completely stand-alone EXE files. VB requires the distribution of a large number of supporting files. Visual C and Visual C++ are very similar to VB in many ways, although the underlying source code is much more difficult to write. C and C++ are not easy languages to learn. VB coding is far more intuitive, albeit not as powerful as C/C++.

Visual Basic is a greatly enhanced version of the BASIC programming language. VB can create Windows programs (whereas BASIC could only create DOS programs) and allows the programmer to quickly and easily create a user interface for their application using the Integrated Development Environment (IDE). The application interface can be created almost exclusively using the mouse. Only the code to be executed needs to be entered via the keyboard. VB introduced the concept of event-driven programming. The non-visual version of BASIC required the programmer to write the code necessary to capture user events (a key press or a mouse click, for example). VB provides that functionality for the programmer. VB also introduces the concept of objects. Objects link code and data in a single package that makes handling the code and data more intuitive. VB forms, menus and controls are all examples of objects. VB also provides built-in database handling features, and support for Internet based applications.

Every Visual Basic application will consist of a number of controls, which provide the fastest means by which a programmer can add features to a program. When a VB program is started, it waits for an event to occur. The event can be a user key press or a mouse click. The event driven nature of Visual Basic means that, when an events occurs, VB will execute the code associated with that event. The programmer's job is to create the code which the program executes in response to an event. For now, take some time to learn the basics before moving on to more advanced topics. Get used to the IDE, spend some time exploring the menu options, and familiarise yourself with the keyboard shortcuts.