• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
 
History of Visual Basic
Visual basic evolved from BASIC(Beginners' All-purpose Symbolic Instruction Code). The BASIClanguage was created by Professors John Kemeny and Thomas Kurtz of Dartmouth College in the mid1960s(Deitel&Deitel, 1999) . It is a carefully constructed English-Like language basically used by theprogrammers to write simple computer programs. It served the purpose of educating laymen like we allthe basic concepts of programming. From then on many versions of BASIC were developed toaccommodate different computer platforms. Some of the versions are Microsoft QBASIC, QUICKBASIC,GWBASIC ,IBM BASICA, Apple BASIC and etc. Apple BASIC was developed by Steve Wozniak, aformer employee of Hewlett-Packard and a good friend of steve Jobs(the founded of Apple Inc.). SteveJobs had worked with Wozniak in the past (together they designed the arcade game "Breakout" for Atari). They pooled their financial resources together to have PC boards made, and on April 1st, 1976they officially formed the Apple Computer Company.The popularity and widespread use of BASIC with different types of computers brought further enhancements of the language, and eventually led to the GUI-based Visual Basic in tandem with thedevelopment of Microsoft Windows. Visual Basic made programming even easier for beginners andseason programmers alike as it save considerable programming time by providing many ready-madecomponents. Since then, Visual Basic has also evolved into many versions, until recently, Visual Basic2008. However, Visual Basic 6 remains as one of the most popular version as it is easy to program and itdoesn't take up a lot of resources and memory of the c
omputer 
The concept of computer programming
Before we begin programming, let us understand some basic concepts of programming. According toWebopedia, a computer program is an organized list of instructions that, when executed, causes thecomputer to behave in a predetermined manner. Without programs, computers are useless. Therefore,programming means designing or creating a set of instructions to ask the computer to carry out certain jobs which normally are very much faster than human beings can do.A lot of people think that computer CPU is a very intelligent thing, which in actual fact it is a dumb andinanimate object that can do nothing without human assistant. The microchips of a CPU can onlyunderstand two distinct electrical states, namely, the on and off states, or 0 and 1 codes in the binarysystem. So, the CPU only understands a combinations of 0 and 1 codes, a language which we calledmachine language. Machine language is extremely difficult to learn and it is not for us laymen to master iteasily. Fortunately , we have many smart programmers who wrote interpreters and compilers that cantranslate human language-like programs such as BASIC into machine language so that the computer cancarry out the instructions entered by the users. Machine language is known as the primitive languagewhile Interpreters and compilers like Visual Basic are called high-level language. Some of the high levelcomputer languages beside Visual Basic are Fortran, Cobol, Java, C, C++, Turbo Pascal, and etc .
 
FORTRAN stands for FORmula TRANslator and it was developed by IBM Inc. between 1954 and 1957which was used specifically for scientific ad engineering applications. It is still widely used today in theengineering fields. COBOL stands for Common Business Oriented Language which was created by agroup of computer manufacturers and industrial computer users in 1959. It was designed for commercialapplications that required large amount of data processing. It is still being used today in the businessfields. C was developed by Dennis Richie at Bell Laboratories in 1972. It is a system implementationlanguage that was used to develop the UNIX operating system. C++ is an extension of C which wascreated by Bjarne Stroustrup in 1980's. It added the OOP (Object-Oriented Programming) feature to Cand now it is the main systems implementation language (Deitel&Deitel, 1999) . PASCAL was created byProfessor Nicklaus Wirth for teaching the concepts of structured programming. Its use is primarilyconfined to the academic world. JAVA is the latest but one of the hottest programming languages
 
developed by the Sun Microsystems in 1995. It was actually an extension of C++ but it has includedextensive libraries for doing multimedia, networking, multithreading , graphics, database access, GUIprogramming. Microsoft also come out with its own version of Javawhich is known as Visual J++. Other programming languages are Power Builder which was developed by Powersoft Corporation and Delphiwhich was developed by Borland Inc.
1.1 What is computer programming?
Before we begin, let us understand some basic concepts of programming. According to Webopedia, acomputer program is an organized list of instructions that, when executed, causes the computer tobehave in a predetermined manner. Without programs, computers are useless. Therefore, programmingmeans designing or creating a set of instructions to ask the computer to carry out certain jobs whichnormally are very much faster than human beings can do. In order to do programming, we need to usecertain computer language to communicate with the computer.There are many computer languages outthere, some of the examples are Visual Basic, Fortran, Cobol, Java, C++, Turbo Pascal, Assemblylanguage and etc.
1.1 What is Visual Basic
?
 
VISUAL BASIC
is a high level programming language which was evolved from the earlier DOS versioncalled BASIC. BASIC means
B
eginners'
A
ll-purpose
S
ymbolic
I
nstruction
C
ode. It is a very easyprogramming language to learn. The codes look a lot like English Language. Different softwarecompanies produced different version of BASIC, such as Microsoft QBASIC, QUICKBASIC, GWBASIC,IBM BASICA and so on. However, it seems people only use Microsoft Visual Basic today, as it is a welldeveloped programming language and supporting resources are available everywhere.With Visual Basic, you can program practically everything depending on your objective. For example, youcan program educational software to teach science , mathematics, language, history , geography and soon. You can also program financial and accounting software to make you a more efficient accountant or financial controller. For those of you who like games, you can program that as well. Indeed, there is nolimit to what you can program! There are many such program in this tutorial, so you must spend moretime on the tutorial in order to benefit the most.VISUAL BASIC is a VISUAL and events driven Programming Language. These are the main divergencefrom the old BASIC. In BASIC, programming is done in a text-only environment and the program isexecuted sequentially. In VISUAL BASIC, programming is done in a graphical environment. In the oldBASIC, you have to write program codes for each graphical object you wish to display it on screen,including its position and its color. However, In Visual Basic , you just need to drag and drop anygraphical object anywhere on the form, and you can change its color any time using the propertieswindows.On the other hand, because users may click on a certain object randomly, so each object has to beprogrammed independently to be able to response to those actions (events). Therefore, a VISUAL BASICProgram is made up of many subprograms, each has its own program codes, and each can be executedindependently and at the same time each can be linked together in one way or another.
1.2 The Visual Basic Environment
 Before you can program in Visual Basic, you need to install VB6 in your computer. If you do not own VB6yet , you can purchase it from Amazon.com by clicking the link below:
 
 Microsoft Visual Basic 6.0 ProfessionalBasically any present computer systems should be able to run the program, be it a Intel Pentium II, IntelPentium III, Intel Pentium IV or even AMD machines, VB6 can run without any problem. It may not be truefor VB2005, older machines might not be able to run VB2005 as it take up much more resources,therefore I still prefer using VB6 as it is light and easy to program. It is still very useful and powerful, and Iam happy to know that Microsoft Windows Vista can support VB6.On start up, Visual Basic 6.0 will display the following dialog box as shown in figure 1.1.You can choose to either start a new project, open an existing project or select a list of recently opened programs. Aproject is a collection of files that make up your application. There are various types of applications wecould create, however, we shall concentrate on creating Standard EXE programs (EXE means executableprogram). Now, click on the Standard EXE icon to go into the actual VB programming environment.
2.1 Creating Your First Application
I
n this section, we are not going into the technical aspects of VB programming; just have a feel of it.Now, you can try out the examples below:Example 2.1.1 is a simple program. First of all, you have to launch Microsoft Visual Basic. Normally, adefault form Form1 will be available for you to start your new project. Now, double click on form1, thesource code window for form1 as shown in figure 2.1 will appear. The top of the source code windowconsists of a list of objects and their associated events or procedures. In figure 2.1, the object displayed isForm and the associated procedure is Load.
Figure 2.1 Source Code Window
When you click on the object box, the drop-down list will display a list of objects you have inserted intoyour form as shown in figure 2.2. Here, you can see a form, command button with the name Command1,
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...