Wednesday, December 19, 2007

How to shows the use these declaration statements for actual variable for following code

How to shows the use these declaration statements for actual variable for following code

Private numval As Integer

Private avgval As Integer, inptval As Variant

Static clcAverage As Single

Dim inptmsg as string

It is best to declare your variables using the Dim or other statements shown earlier, but you also can assign a type to a variable using an implicit declaration. With this type of declaration, a special character is used at the end of the variable name when the variable is first assigned a value.

How to use the variable declarations

How to use the variable declarations

Each of the following statements can be used to explicitly declare a variable’s type:

Dim varname [As vartype] [ , varname2 [As vartype2]]

Private varname [As vartype] [ ,varname2 [As vartype2]]

Static varname [As vartype ] [ , varname2 [As vartype]]

Public varname [As vartype] [ , varname2 [As vartype2]]

Dim, Private, Static, and Public are Visual Basic keyword that define how and where the variable can be used. varname and varname2 represent the names of the variables that you want to declare. As indicated in the syntax, you can specify multiple variables in the same statement, as long as you separate the variables by commas.

Vartype and vartype2 represent the type definition of the respective variables. The type definition is a keyword, which tells VB what kind of information will be stored in the variable.

How to use VB6 to create a simple division program

How to use VB6 to create a simple division program

a) The interface of the program, it’s support three type of division.

b) The source code of the division program at the command button.

inpt1 = Text1.Text

inpt2 = Text2.Text

Text3.Text = inpt1 / inpt2

Text4.Text = inpt1 \ inpt2

Text5.Text = inpt1 Mod inpt2

c) The result is like below


How to use different control used to handle different types of data

How to use different control used to handle different types of data

Control Name

Data Type

Control Property

Label

Text, Numeric, Date

Caption

TextBox

Text, Memo, Numeric, Date

Text

CheckBox

Logical, True/False

Value

PictureBox

Long Binary

Picture

Image

Long Binary

Picture

How to use the special character at the end of a variable name can identify the type of data stored by the variable

How to use the special character at the end of a variable name can identify the type of data stored by the variable

The special character at the end of a variable name can identify the type of data stored by the variable.

Variable Type

Character

Integer

%

Long

&

Single

!

Double

#

Currency

@

String

$

Byte

None

Boolean

None

Date

None

Object

None

Variant

None

How to use the type of variables

How to use the type of variables

- Below is the type of variables.

Type

Stores

range of values

Integer

whole numbers

-32768 to 32767

Long

whole numbers

+/- 2 billion

Single

decimal numbers

+/- 1E-45 to 3E38

Double

decimal numbers

+/- 5E-324 to 1.8E308

Currency

number with up to 15 digits left of

+/- 9E14

the decimal and 4 digit right of the decimal

String

text information

up to 65000 character

Byte

whole numbers

0 to 255

Boolean

logical values

True or False

Date

date and time information

1/1/100 to 12/31/9999

Object

picture and OLE object

N/A

Variant

any of the preceding data type

N/A

How to see the place and size of the object at toolbar

How to see the place and size of the object at toolbar

- The toolbar is showing the place and size of the selected object.


How to show the property window at toolbar

How to show the property window at toolbar

- To show the property window.

How to show the project explorer at toolbar

How to show the project explorer at toolbar

- To show the project explorer.

How to use the stop at toolbar

How to use the stop at toolbar

- Click the selected icon to stop the program that running.

How to use pause at toolbar

How to use pause at toolbar

- Click the selected icon to pause the project that running.

How to use the Run at toolbar

How to use the Run at toolbar

- Click the selected icon to run the application.

How to use the undo at toolbar

How to use the undo at toolbar

- Click the selected icon to undo the thing that you done recently.

How to use find at toolbar

How to use find at toolbar

- Click the selected icon to find the text the you want to find.

How to use paste at toolbar

How to use paste at toolbar

- Click to selected icon to paste the thing that you have cut or copy .

How to use copy at toolbar

How to use copy at toolbar

- Click to selected icon to copy the selected area.

How to use the cut at toolbar

How to use the cut at toolbar

- Click the selected icon to cut the selected area.

How to use save at toolbar

How to use save at toolbar

- Click the selected icon to save the current file.

How to use open at toolbar

How to use open at toolbar

- Click the selected icon to open the file.

How to edit the menu editor at toolbar

How to edit the menu editor at toolbar

- To create the menu or modify the menu bar at the selected form.

How to use toolbar to add a standard EXE project

How to use toolbar to add a standard EXE project

- Click the selected icon to add a new standard EXE, ActiveX EXE, Active X DLL, and Active X control.

How to use the OLE at toolbox

How to use the OLE at toolbox

- Provides a connection between the program and an OLE server.

How to use the Data Control at toolbox

How to use the Data Control at toolbox

- Provides an interface between the program and a data source.

How to use the Image at toolbox

How to use the Image at toolbox

- To display picture or graphics images.

How to use the Line at toolbox

How to use the Line at toolbox

- Display a line on the form.

How to use the Shape at toolbox

How to use the Shape at toolbox

- Display the shape on the form.


How to use the File List Box at toolbox

How to use the File List Box at toolbox

- Let user select a file.

How to use the Drive List Box at toolbox

How to use the Drive List Box at toolbox

- Let user select a disk drive.

How to use the Drive List Box at toolbox

How to use the Drive List Box at toolbox

- Let user select a disk drive.

How to use the Timer at toolbox

How to use the Timer at toolbox

- Let program perform functions on timed event

How to use the Vertical Scrollbar at toolbox

How to use the Vertical Scrollbar at toolbox

- Lets user choose a value based on the position of the button in the bar

How to use the Horizontal Scrollbar at toolbox

How to use the Horizontal Scrollbar at toolbox

- Lets user choose a value based on the position of the button in the bar.

How to use the List Box at toolbox

How to use the List Box at toolbox

- Let user choose from a list of items.


How to use the Combo Box at toolbox

How to use the Combo Box at toolbox

- Let user choose from a list of items or enter new value.

How to use the Option box at toolbox

How to use the Option box at toolbox

- Let user choice one of a group of items.

How to use the Check Box at toolbox

How to use the Check Box at toolbox

- Let user make True/False choice.

How to use the Command Button at toolbox

How to use the Command Button at toolbox

- Let the user initiate actions by clicking the button.

How to use the Frame at toolbox

How to use the Frame at toolbox

- To serve as a container for other control.

How to use the textbox at toolbox

How to use the textbox at toolbox

- To display text and allows the user to enter and edit text.


How to use the Picture-Box at toolbox

How to use the Picture-Box at toolbox

- To display graphics images.

How to use the label at toolbox

How to use the label at toolbox

- To display text.


How to cascade the window at window menu

How to cascade the window at window menu

- Choose Window>Cascade to cascade the window

How to tile the window vertically at window menu

How to tile the window vertically at window menu

- Choose Window>Tile Vertically to tile the windows vertically.

How to tile the window horizontally at window menu

How to tile the window horizontally at window menu

- Choose Window>Tile Horizontally to tile the windows horizontally.

How to add-in a visual data manager at Add-Ins menu

How to add-in a visual data manager at Add-Ins menu

- Choose Add-Ins>Visual Data Manager to adding the visual data manager to project like adding MS Access database to project.


How to set the option of VB6

How to set the option of VB6

- Choose Tools>Option to set the option

How to add a menu editor at tools menu

How to add a menu editor at tools menu

a.)- Choose Tools>Menu Editor to build a menu

b.) A dialog box will display, then fill the menu that you want to use.

- The result is like below.


How to use lock controls at format menu

How to use lock controls at format menu

- Choose Format>Lock Controls to lock the selected object. So the object can’t move anymore unless it unlock.

How to use the Order at Format menu

How to use the Order at Format menu

- Choose Format>Order to set order to the object either bring to front or send to back.

How to set the object at the center of form

How to set the object at the center of form

- Choose Format>Center in Form to set the object to center.

How to set the vertical spacing between the objects

How to set the vertical spacing between the objects

- Choose Format>Vertical Spacing to set the vertical spacing between the objects.

How to set the horizontal spacing between the objects

How to set the horizontal spacing between the objects

- Choose Format>Horizontal Spacing to set the horizontal spacing between the objects.