Title: IT4201:Rapid Application Development RAD
1IT4201 Rapid Application Development (RAD)
2Introduction to Visual Basic
3Introduction to Visual Basic
- Microsoft Visual Basic 6 project consists of
mainly the following - Forms (will be saved as .frm)
- Modules (.bas)
- Class modules(.cls)
- Designers (.dsr)
4Introduction to Visual Basic
- Visual Basic has Objects
- And Objects have Properties (attributes) and
Methods - Object.property value
- e.g. Form1.backcolor rgb(255,0,0)
- Object.method arguments
- form1.show
5Introduction to Visual Basic
- Declaration of Variables
- Dim x as integer
- Implicit and Explicit Declaration
- Scope
- Private,Public
- Static
- Data types
6Introduction to Visual Basic
- Visual Basic 6 has four procedure types
- Sub procedures
- Functions
- Event Procedures
- Property procedures
-
7Introduction Visual Basic
- Control Structures
- decision structures if then
- if thenelse, select case
- Loop control Do...LoopFor...NextFor Each...Next
8Introduction to Visual Basic 6
- Error trapping
- On error Goto ltLine labelgt
- On Error resume next
- On Error Goto 0
- No Global Error trapping
- Err intrinsic object methods and attributes
9Introduction to Visual Basic 6
- ARRAYS
- Arrays allow you to refer to a series of
variables by the same name and to use a number
(an index) to tell them apart - Dynamic, Fixed arrays
- Both have Multi Dimension arrays
-
-
10Introduction to Visual Basic 6
- Dim X(10) there are eleven 11 elements
- Option base 1
- Default is zero based
- Ubound () and Lbound()
11Introduction to Visual Basic 6
- One can also give lower bound and upper bound the
following way - Dim x(1to10)
- Dim X() ---Dynamic array
- One has to re-declare with
- ReDim statement which is an executable statement
12Introduction to Visual Basic 6
- Preserve statement
- ReDim preserve X(10)
- Erase X initialize the array
13Introduction to Visual Basic 6
- Debugging of an application
- How to place a toggle or Break point
14THANK YOU WISH YOU ALL THE BEST