The Mouse Pointer
As the user moves the mouse, the mouse pointer travels
across the screen to show the movement. Your application
can control the mouse cursor's shape. The following
table lists the possible mouse cursors you can set.
To change the mouse cursor's shape when it passes
over a control requires that you set the MousePointer
property.
Named Constant |
Description |
vbArrow |
Regular mouse pointer arrow
|
vbCrosshair |
Crosshair
|
vbIbeam |
I-beam |
vbIconPointer |
Small square
within a square |
vbSizePointer |
Four-pointed
arrow |
vbSizeNESW |
Double arrow
pointing northeast and southwest |
vbSizeNS |
Double arrow
pointing up and down |
vbSizeNWSE |
Double arrow
pointing northwest and southeast |
vbSizeWE |
double arrow
pointing left and right |
vbUpArrow |
Up arrow |
vbHourglass |
Hourglass (indicates
wait) |
vbNoDrop |
Not drop |
vbArrowHourglass |
Arrow with an
hourglass |
vbArrowQuestion |
Arrow with a
question mark |
vbSizeAll |
Appears when
you resize a window |
vbCustom |
The shape indicated
by the MouseIcon property |
You can set the mouse pointer to display a custom
icon or cursor. Using custom icons or cursors allows
you to further modify the look or functionality of
your application. Icons are simply .ico files, like
those shipped with Visual Basic. Cursors are .cur
files and, like icons, are essentially bitmaps. Cursors,
however, are created specifically to show the user
where actions initiated by the mouse will take place
— they can represent the state of the mouse and the
current input location.
|
Visual Basic does not support animated
cursor (.ani) files. |
|