Method XbpActiveXControl():mouseDown() Foundation

Default event handler for ActiveX control event "MouseDown" (DISPID_MOUSEDOWN).

Syntax
:mouseDown( <nButton>, <nShift>, ;
            <nXPos>,   <nYPos> ) --> self
Parameters
<nButton>
A numeric value indicating the mouse button clicked. A value of 1 denotes the left, 2 the right and 3 the middle mouse button.
<nShift>
A numeric value indicating the state of the SHIFT, ALT and CTRL keys at the time the mouse button was pressed. A value of 1 indicates the SHIFT key was down, a value of 2 the CTRL was pressed and a value of 4 indicates the ALT key was depressed. The value in parameter <nShift> can be any combination of these values. 0 indicates neither key was down when the mouse button was depressed.
<nXPos>
<nXPos> is a numeric value indicating the horizontal position of the mouse pointer when the mouse button was pressed.
<nYPos>
<nYPos> is a numeric value indicating the vertical position of the mouse pointer when the mouse button was pressed.
Return

This method returns the object executing the method (self).

Description

The method :mouseDown() is called automatically upon reception of a "MouseDown" (DISPID_MOUSEDOWN) COM event. The :mouseDown() event handler generates an xbeM_LbDown, xbeM_RbDown or xbeM_MbDown event. The event is posted to the current thread's message queue using the function PostAppEvent().

Applications can process mouse events via the standard event protocol defined for Xbase Parts. In order to react to mouse event generated by an ActiveX control, a code block can be assigned to one of the callback slots :lbDown, :rbDown or :mbDown, respectively. Alternatively, an overloaded method :lbDown(), :rbDown() or :mbDown() can be implemented in a derived class.

Not all ActiveX controls generate mouse events. If a control does not generate "MouseDown" (DISPID_MOUSEDOWN) events, the method :mouseDown() will not be called.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.