Visual Basic

Páginas: 14 (3345 palabras) Publicado: 9 de septiembre de 2011
introduction

Lesson1 :Introduction
1.1 A brief description of Visual Basic
VISUAL BASIC is a high level programming language evolved from the earlier DOS version called BASIC.

BASIC means Beginners' Allpurpose Symbolic Instruction Code. It is a fairly easy programming language to learn. The codes look a bit like English Language. Different software companies produced different version ofBASIC, such as Microsoft QBASIC, QUICKBASIC, GWBASIC ,IBM BASICA and so on. VISUAL BASIC is a VISUAL and events driven Programming Language.These are the main divergence from the old BASIC. In BASIC, programming is done in a text-only environment and the prgram is executed sequentially. In VISUAL BASIC, programming is done in a graphical environment. Because users may click on a certain objectrandomly, so each object has to be programmed indepently to be able to response to those actions(events).Therefore, a VISUAL BASIC Program is made up of many subprograms, each has its own program codes, and each can be excecuted indepently and at the same time each can be linked together in one way or another.

1.2 The Visual Basic Environment
On start up, Visual Basic 6.0 will display thefollowing dialog box as shown in figure 1.1. You can choose to 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 we could create, however, we shall concentrate on creating Standard EXE programs(EXE means executable program). Now, click on the Standard EXEicon to go into the actual VB programming environment.

Figure 1.1 The Visual Basic Start-up Dialog Box

http://www.vbtutor.net/lesson1.html (1 of 3) [2/23/2003 1:56:16 PM]

introduction

In figure 1.2, the Visual Basic Enviroment consists of the
q q q

The Blank Form window which you can design your application's interface. The Project window displays the files that are created in yourapplication. The Properties window which displays the properties of various controls and objects that are created in your applications.

It also includes a Toolbox that consists of all the controls essential for developing a VB Application. Controls are tools such as boxes, buttons, labels and other objects draw on a form to get input or display output. They also add visual appeal. Figure 1.2:The Visual Basic Enviroment
http://www.vbtutor.net/lesson1.html (2 of 3) [2/23/2003 1:56:16 PM]

introduction

[Back to contents page]

http://www.vbtutor.net/lesson1.html (3 of 3) [2/23/2003 1:56:16 PM]

VB lesson2

Lesson 2: Building a Visual Basic Application
2.1 Creating Your First Application In this section, we are not going into the technical aspect of VB programming, just havea 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, a default form Form1 will be available for you to start your new project. Now, double click on form1, the source code window for form1 will appear. Don't worry about the begining and the end statements(i.e Private Sub Form_Load.......EndSub.); Just key in the lines in between the above two statements exactly as are shown here.When you run the program, you will be surprise that nothing shown up.In order to display the output of the program, you have to add the Form1.show statement like in Example 21.2 and Example 2.1.3. Try them out.

Example 2.1.1 Private Sub Form_Load For i=1 to 5 print "Hello" next i End Sub

Example 2.1.2Private Sub Form_Load Form1.show For i=1 to 5 print "Hello" next i End Sub

Example 2.1.3 Private Sub Form_Load Form1.show For i=1 to10 print i next i End Sub

2.2 Steps in Building a Visual Basic Application Step 1 Draw the interface Step 2 Set Properties Step 3 Write the events code Example 2.1 This program is a simple program that calculate the volume of a cylinder. Let design the interface:...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Visual basic
  • visual basic
  • Visual Basic
  • visual basic
  • visual basic
  • visual basic
  • Visual basic
  • Que Es El Visual Basic

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS