Table of contents
TOC
折叠目录
展开目录

OptionGroup.MouseUp 事件 (访问)OptionGroup.MouseUp Event (Access)

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

当用户释放鼠标按钮时,会发生MouseUp事件。The MouseUp event occurs when the user releases a mouse button.

语法Syntax

表达式MouseUp(* 按钮班次 * X,* * Y ** )expression. **MouseUp( ** Button, ** Shift, ** X, ** Y )

表达式_一个表示选项组中的对象的变量。_expression A variable that represents an OptionGroup object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
按钮Button必需RequiredIntegerInteger释放以触发该事件的鼠标键。如果需要测试 Button 参数,可以使用下列固有常量之一作为位掩码:The button that was released to trigger the event. If you need to test for the Button argument, you can use one of the following intrinsic constants as bit masks:

  • acLeftButton 鼠标左键的位掩码。acLeftButton The bit mask for the left mouse button.

  • acRightButton 鼠标右按钮的位掩码。acRightButton The bit mask for the right mouse button.

  • acMiddleButton 鼠标中键的位掩码。acMiddleButton The bit mask for the middle mouse button.

| |Shift|需要 |整数|在 Button 参数所指定的按钮被按下或释放时 SHIFT、 CTRL 和 ALT 键的状态。如果需要测试 Shift 参数,可以使用下列固有常量之一作为位掩码:| | Shift|Required|Integer|The state of the SHIFT, CTRL, and ALT keys when the button specified by the Button argument was pressed or released. If you need to test for the Shift argument, you can use one of the following intrinsic constants as bit masks:
  • acShiftMask 按住 SHIFT 键的位掩码。acShiftMask The bit mask for the SHIFT key.

  • acCtrlMask CTRL 键位掩码。acCtrlMask The bit mask for the CTRL key.

  • acAltMask ALT 键的位掩码。acAltMask The bit mask for the ALT key.

| |X|需要 |单个|以缇为单位的鼠标指针当前位置的 x 坐标。| |Y|需要 |单个|以缇为单位的鼠标指针的当前位置的 y 坐标。|| | X|Required|Single|The x coordinate for the current location of the mouse pointer, in twips. | | Y|Required|Single|The y coordinate for the current location of the mouse pointer, in twips. |

注解Remarks

  • MouseUp事件仅适用于窗体、 窗体节和窗体,不适用于报表上的控件上。The MouseUp event applies only to forms, form sections , and controls on a form, not controls on a report.

  • 该事件不适用于附到其他控件上的标签,例如文本框的标签。它只适用于“独立”的标签。在附属标签中按下和释放鼠标键与在标签所附属的控件中按下和释放按钮有相同的效果。这种情况下,将只发生控件的正常事件,而不会发生附属标签的独立事件。This event does not apply to a label attached to another control, such as the label for a text box. It applies only to "freestanding" labels. Pressing and releasing a mouse button in an attached label has the same effect as pressing and releasing the button in the associated control. The normal events for the control occur; no separate events occur for the attached label.

若要在这些事件发生时运行宏或事件过程,请将OnMouseUp属性设置为宏的名称或 [事件过程]。To run a macro or event procedure when these events occur, set the OnMouseUp property to the name of the macro or to [Event Procedure].

可以使用MouseUp事件指定按下或释放特定的鼠标按钮时发生的情况。与单击DblClick事件,不同MouseUp事件可以区分为左、 右和中间的鼠标按钮。您还可以编写代码的使用 SHIFT、 CTRL 和 ALT 键的鼠标键盘组合。You can use a MouseUp event to specify what happens when a particular mouse button is pressed or released. Unlike the Click and DblClick events, the MouseUp event enables you to distinguish between the left, right, and middle mouse buttons. You can also write code for mouse-keyboard combinations that use the SHIFT, CTRL, and ALT keys.

导致发生某个窗体的MouseUp事件,按窗体上的空白区域或记录选择器中的鼠标按钮。若要进行窗体节的MouseUp事件,按下鼠标按钮在窗体节的空白区域中。To cause a MouseUp event for a form to occur, press the mouse button in a blank area or record selector on the form. To cause a MouseUp event for a form section to occur, press the mouse button in a blank area of the form section.

以下情况适用于MouseUp事件:The following apply to MouseUp events:

  • 如果指针在窗体或控件上时按下鼠标键,该对象将接收所有鼠标事件,直到最后一个MouseUp事件。If a mouse button is pressed while the pointer is over a form or control, that object receives all mouse events up to and including the last MouseUp event.

  • 如果鼠标按钮被连续按下,那个接收第一次按下后的鼠标事件的对象,将接收所有的鼠标事件,直到释放所有按钮为止。If mouse buttons are pressed in succession, the object that receives the mouse event after the first press receives all mouse events until all buttons are released.

要响应由移动鼠标事件,请使用MouseMove事件。To respond to an event caused by moving the mouse, you use a MouseMove event.

另请参阅See also

概念Concepts

选项组对象OptionGroup Object

© 2018 Microsoft