Lesson1 : Introduction to Visual Basic 6

<< Home>>  <Next Lesson>

1.1 The concept of computer programming

Programming means designing a set of instructions to instruct the computer to carry out certain jobs that are very much faster than human beings can do. The earliest programming language is called machine language that uses binary codes comprises 0 and 1 to communicate with the computer. Machine language is extremely difficult to learn . Fortunately , scientists have invented high level programming languges that are much easier to master. Some of the high level programming languages are Java, Javascript, C, C++, c# and Visual Basic.

1.2 What is Visual Basic?

VISUAL BASIC is a high-level programming language that evolved from the earlier DOS version called BASIC. BASIC means Beginners' All-purpose Symbolic Instruction Code. The code looks a lot  like the English Language. Now, there are many versions of Visual Basic available in the market, the latest being Visual Basic 2017 that is bundled with other programming languages such as C#. However, the most popular one and still widely used by many VB programmers is none other than Visual Basic 6.

VISUAL BASIC is a VISUAL Programming Language because programming is done in a graphical environment. In VB6 , you just need to drag and drop any graphical object anywhere on the form and click on the object to enter the code window and start programming.

In addition, Visual Basic 6 is Event-driven because we need to write code that performs some tasks in response to certain events. The events usually comprise but not limited to the user's inputs. Some of the events are load, click, double click, drag, and drop, pressing the keys and more. We will learn more about events in later lessons. Besides that, a VB6 Program is made up of many subprograms or modules, each has its own program code, and each can be executed independently; they can also be linked together in one way or another.

1.3 What programs can you create with Visual Basic 6?

In VB 6, you can create any program depending on your objective. For math teachers, you can create mathematical programs such as Geometric Progression, Quadratic Equation Solver, Simultaneous Equation Solver ,Prime Number, Factors Finder, Quadratic Function Graph Plotter and so on. For science teachers, you can create simulation programs such as Projectile, Simple Harmonic Motion, Star War  etc. If you are in business, you can also create business applications such as inventory management system , Amortization Calculator , investments calculator, point-of-sale system, payroll system, accounting program and more to help manage your business and increase productivity. For those of you who like games , you can create programs such as slot machine, reversi, tic tac toe and more. Besides, you can create multimedia programs such as Smart Audio Player, Multimedia Player  and more. Indeed, there is no limit to what program you can create ! We offer many sample codes in our tutorial.

1.4 The Visual Basic 6 Integrated Development Environment

Before you can write programs in VB 6, you need to install Visual Basic 6 compiler on your computer. You can purchase a copy of Microsoft Visual Basic 6.0 Learning Edition or Microsoft Visual Basic Professional Edition from Amazon.com, both are vb6 compilers. If you have already installed Microsoft Office in your PC or laptop, you can also use the built-in Visual Basic Application in Excel to start creating Visual Basic programs without having to spend extra cash to buy the VB6 compiler.

You can also install VB6 on Windows 10 but you need to follow certain steps otherwise installation will fail. First, you need to run setup as administrator. Next, you need to use custom installation. Clear the checkbox for Data Access. If you don't, set up will hang at the end of the installation. click next and wait for the installation to complete. For complete instructions, please follow this link Install VB6 on Windows 10

After installing the vb6 compiler, the icon will appear on your desktop or in your programs menu. Click on the icon to launch the VB6 compiler. On start up, Visual Basic 6.0  will display the following dialog box as shown in Figure 1.1.

Figure 1.1: New Project Dialog

You can choose to either start a new project, open an existing project or select a list of recently opened programs. A project is a collection of files that make up your application. There are various types of applications that we could create, however, we shall concentrate on creating Standard EXE programs (EXE means executable). Before you begin, you must think of an application that might be useful, have commercial values . educational or recreational. click on the Standard EXE icon to go into the actual Visual Basic 6 programming environment.

When you start a new Visual Basic 6 Standard EXE project, you will be presented  with the Visual Basic 6 Integrated Development Environment (IDE). The Visual Basic 6 Integrated Programming Environment is shown in Figure 1.2. It consists of the toolbox, the form, the project explorer and the properties window.

Figure 1.2: VB6 Programming Environment

The Form is the primary building block of a Visual Basic 6 application. A Visual Basic 6 application can actually comprise many forms, but we shall focus on developing an application with one form first. We will learn how to develop applications with multiple forms later. Before you proceed to build the application, it is a good practice to save the project first. You can save the project by selecting Save Project from the File menu, assign a name to your project and save it in a certain folder.

  Bookmark and Share

<<Home>> <Next Lesson>


Copyright ® 2008 Dr.Liew Voon Kiong . All rights reserved |Contact

[Privacy Policy]