Professional Documents
Culture Documents
1. Numeric Types
A. Integer : Stores integer values in the range –32768 to +32768. Stored
using 2 bytes.
B. Long : Stores long integers in the range –2147483648 to 2147483647.
Stored using 4 bytes.
C. Single : Stores single precision floating point numbers. It can store
negative numbers in the range –3.40E38 to –1.40E-45 and positive
numbers in the range 1.40E-45 to 3.40E38. They are stored using 4 bytes.
D. Double : Stores double precision floating point numbers. Can store
negative numbers in the range –1.79E308 to –4.94E324 and positive
numbers in the range 4.94E-324 to 1.79E308. Stored using 8 bytes.
E. Currency : Stores fixed point numbers with 4 fractional digits. The
currency data type can represent numbers in the range –
922337203685477.5808 to 922337203685477.5807.
F. Byte : Data is stores as bytes and an individual byte can be accessed very
easily. The byte type basically holds an integer in the range of 0 to 255.
Bytes are frequently used to access binary files, image and sound files.
4. Date Variables
These variables store Data and Time. They are double precision numbers : the
integer part represents date and fractional part represents the time.
Eg Dim Jdate as Date
Jdate = “03/01/2005”
Jdate = “03/01/2005 10:00:00 AM”
Jdate = #03/01/2005 10:00:00 AM#
Initialize : This event is fired a form is loaded. This event is normally used to initialize
variables used in the form. In this event Form object is referenced.
Load : When a form is loaded into memory, either using load statement or show method
or by referencing a form property, the load event is triggered after Initialize event. This
event is fired only once for each form. Form object’s properties and controls are
referenced. VB creates the form window and its child controls.
Activate : The activate event is fired whenever the form becomes active window i.e. the
window is ready to accept user input. The form becomes the active window when the
user clicks the mouse on it or Show or SetFocus method is called.
Resize : This event is fired when the the form is resized or the window state is changed
by minimize, maximize or restore buttons. It is also fired the first time the form is
displayed.
Paint : The Paint event is fired when the Form’s AutoRedraw property is set to False. VB
requests the form to refresh itself the first time it is displayed and when another window
covers and then uncovers it.
Deactivate : This event is fired when the form looses the focus. Exactly opposite to
Activate event.
QueryUnload : When the form is closed or the form Unload method is called, this event
is fired, followed by Unload event. The QueryUnload event allows the option of
canceling the unloading of form by setting the Cancel parameter to True.
Unload : In this event, Clean up of objects and variables is done. Any remaining object
variable should be set to Nothing in this event.
Terminate : This is the final event that is fired for a form. It occurs when a form is set to
Nothing. This event indicates that VB has removed the form and its module from
memory.