Click to Rate and Give Feedback
MSDN
MSDN Library
Office Development
Access 2007
Screen Object
Properties
 MousePointer Property
Screen.MousePointer Property
You can use the MousePointer property together with the Screen object to specify or determine the type of mouse pointer currently displayed. Read/write Integer.

Syntax

expression.MousePointer

expression   A variable that represents a Screen object.

Remarks

The setting for the MousePointer property is an Integer value representing one of the following pointers.

SettingDescription
0(Default) The shape is determined by Microsoft Access
1Normal Select (Arrow)
3Text Select (I-Beam)
7Vertical Resize (Size N, S)
9Horizontal Resize (Size E, W)
11Busy (Hourglass)
Bb237557.vs_note(en-us,office.12).gif  Note
Setting the MousePointer property to an integer other than one that appears in the preceding table will cause the property to be set to 0.

The MousePointer property affects the appearance of the mouse pointer over the entire screen. Some custom controls have a MousePointer property that, if set, will specify how the mouse pointer is displayed when it's positioned over the control.

You could use the MousePointer property to indicate that your application is busy by setting the property to 11 to display an hourglass icon. You can also read the MousePointer property to determine what's being displayed. This could be useful if you wanted to prevent a user from clicking a command button while the mouse pointer is displaying an hourglass icon.

Setting the MousePointer property to 11 is the same as passing the True (–1) argument to the Hourglass method of the DoCmd object. Conversely, passing the True argument to the Hourglass method also sets the MousePointer property to 11.

Example

The following example changes the mouse pointer to an hourglass.

Visual Basic for Applications
Screen.MousePointer = 11


Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker