Table of contents

Screen.MousePointer 属性 (访问)Screen.MousePointer Property (Access)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

可以使用鼠标指针以及屏幕对象属性可以指定或确定当前显示的鼠标指针的类型。读取/写入的整数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.


表达式鼠标指针expression. MousePointer

表达式_一个表示屏幕对象的变量。_expression A variable that represents a Screen object.


鼠标指针属性设置为一个整数值,表示以下指针之一。The setting for the MousePointer property is an Integer value representing one of the following pointers.

00(默认值)形状由 Microsoft Access 确定(Default) The shape is determined by Microsoft Access
11常规选择(箭头)Normal Select (Arrow)
33文本选择(I 型指针)Text Select (I-Beam)
77垂直调整大小(南、北方向)Vertical Resize (Size N, S)
99水平调整大小(东、西方向)Horizontal Resize (Size E, W)
1111系统忙(沙漏)Busy (Hourglass)

请注意鼠标指针属性设置为一个整数,而不是显示在前面的表中将属性设置为 0。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.

您可以使用鼠标指针属性以指示您的应用程序通过将属性设置为 11 显示沙漏图标正忙。您还可以阅读鼠标指针属性,以确定要显示的内容。这可能是有用的如果要防止用户单击命令按钮时,鼠标指针显示沙漏图标。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.

鼠标指针属性设置为 11 是将(?1) 的参数传递给沙漏DoCmd对象的方法相同。相反,将显示沙漏传递True的参数也鼠标指针将属性设置为 11。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.


下面的示例将鼠标指针改为沙漏图标。The following example changes the mouse pointer to an hourglass.

Screen.MousePointer = 11

另请参阅See also


Screen 对象Screen Object

© 2018 Microsoft