Search This Blog

Introduction to visual basic

Slide 3
 
Slide 3






VISUAL BASIC is a high level programming language which  evolved from the earlier DOS version called BASIC. BASIC means Beginners' All-purpose Symbolic Instruction Code. It is a very  easy programming language to learn. The code look a lot  like English Language. Different software companies produced different versions of BASIC, such as Microsoft QBASIC, QUICKBASIC, GWBASIC ,IBM BASICA and so on. However, people prefer to use Microsoft Visual Basic today, as it is a well developed programming language and supporting resources are available everywhere. Now, there are many versions of VB exist in the market, the most popular one and still widely used by many VB programmers is none other than Visual Basic 6 
     Visual Basic is one very powerful programming language that helps one develop sophisticated, graphical applications that can be run on Microsoft Windows environment. In general, visual is a method used to create GUI applications i.e., visual programming style involves a lot of illustrations (graphics entities), rather than writing numerous lines of code to describe the application’s interface.
     Visual Basic   supports event driven programming. A program, in general, can be developed in three ways-
             -in modular programming style
             -in object oriented style
             -in event-driven programming style.
The modular or procedural programming style emphasizes on procedures and not on data; the data takes the back seat : bigger programs are divided onto smaller complete sub parts, know as modules.
The object-oriented programming style emphasizes upon objects; an object is an identifiable entity with some characacteristics(denoted through data) and assciated behaviour(denoted through function). 
The event driven programming style responds to the user events and is driven by the occurance of user-event. The visual basic programming language is a beautiful combination of object oriented and event driven programming that supports visual effects  i.e., GUI effects. 
                          
                                     Slide 8
                    VB ENVIRONMENT

    
  Data Types In VB
 1) Nemeric data type.
 2)Non- Nemeric data type.Slide 8
Slide 10
Numeric Data 
Numeric data types are types of data that consist of numbers, which can be computed mathematically with various standard operators such as add, minus, multiply, divide and more
Slide 1
Data Type
Storage
Range
String(fixed length)
Length of string
1 to 65,400 characters
String(variable length)
Length + 10 bytes
0 to 2 billion characters
Date
8 bytes
January 1, 100 to December 31, 9999
Boolean
2 bytes
True or False
Object
4 bytes
Any embedded object
Variant(numeric)
16 bytes
Any value as large as Double
Variant(text)
Length+22 bytes
Same as variable-length string
 
 
Nonnumeric Data
    Nonnumeric data types are data that cannot be manipulated mathematically using standard arithmetic operators. The non-numeric data comprises  text or string data types, the Date data types, the Boolean data types that store only two values (true or false), Object data type and Variant data type 
Slide 1
Data Type
Storage
Range
String(fixed length)
Length of string
1 to 65,400 characters
String(variable length)
Length + 10 bytes
0 to 2 billion characters
Date
8 bytes
January 1, 100 to December 31, 9999
Boolean
2 bytes
True or False
Object
4 bytes
Any embedded object
Variant(numeric)
16 bytes
Any value as large as Double
Variant(text)
Length+22 bytes
Same as variable-length string
  Slide 14
Variable NamesSlide 14
It must be less than 255 characters
No spacing is allowed
Must contain only letters, numbers and the underscore character(_).
Period is not permitted
  Constant

Slide 19
Constants are different from variables in the sense that their values do not change during the running of the program.
Declaring a Constant
The format to declare a constant is
Const  Constant Name  As Data Type = Value
Example 5.3
Const Pi As Single=3.142
Const Temp As Single=37
Const Score As Single=100