This section describes how to enable your control to respond to the mouse. It contains the following topics:
Determines whether mouse events will be processed against the object. Mouse events are processed against the visible pixels of the structured graphic or sprite object. Read/write at run time; write access is available at run time only when the sprite is stopped.
PARAM Tag Syntax
<PARAM NAME="MouseEventsEnabled" VALUE="0 | 1">
Script Syntax
object.MouseEventsEnabled [=fBoolean]
Mouse events are z-order dependent. For example, if you have two objects positioned on top of each other, whichever object has a higher z-order will receive the mouse event when the user clicks, releases, or moves over that region.
Structured Graphics note: Enabling this property turns on a 1-bit bit mask for the control that slows down its rendering when it's being manipulated. For optimal performance, turn this property off unless you're specifically using it. Mouse events are not processed against the outline of the shape.
Occurs when the left mouse button is depressed and released while the mouse pointer is inside the region contained by the object's boundaries. A click event can also occur by hitting the ENTER key when an object has focus. The onclick event follows the onmouseup event when it occurs as a result of a mouse button click.
VBScript Syntax
Sub object_onclick
script
End Sub
JScript Syntax
<SCRIPT LANGUAGE="JavaScript" FOR=object EVENT=onclick>
script
<SCRIPT>
Occurs when the left mouse button is depressed and released twice in quick succession while the mouse pointer is inside the region contained by the object's boundaries.
VBScript Syntax
Sub object_ondblclick
script
End Sub
JScript Syntax
<SCRIPT LANGUAGE="JavaScript" FOR=object EVENT=ondblclick>
script
<SCRIPT>
The sequence of events for an ondblclick event is as follows:
The user can control the timing of click events by changing the Mouse settings found in the Control Panel.
Fires when the left mouse button is pushed down while the pointer is within the region contained by the object.
VBScript Syntax
Sub object_onmousedown(
button,
shift,
x,
y
)
script
End Sub
JScript Syntax
<SCRIPT LANGUAGE="JavaScript" FOR=object EVENT=onmousedown(
button,
shift,
x,
y
) >
script
<SCRIPT>
Fires when the mouse pointer is moved in the region contained by the object.
VBScript Syntax
Sub object_ onmousemove(
button,
shift,
x,
y
)
script
End Sub
JScript Syntax
<SCRIPT LANGUAGE="JavaScript" FOR=object EVENT=onmousemove(
button,
shift,
x,
y
) >
script
<SCRIPT>
Occurs when the mouse pointer is moved out of the region contained by the object's boundaries.
VBScript Syntax
Sub object_onmouseout
script
End Sub
JScript Syntax
<SCRIPT LANGUAGE="JavaScript" FOR=object EVENT=onmouseout>
script
<SCRIPT>
Fires when the mouse pointer is moved into the region contained by the object, from a region outside the object's boundaries.
VBScript Syntax
Sub object_onmouseover
script
End Sub
JScript Syntax
<SCRIPT LANGUAGE="JavaScript" FOR=object EVENT=onmouseover>
script
<SCRIPT>
onmouseover example Right click inside the frame and choose View Source to get source code.
Fires when the left mouse button is released (from a depressed position) while the pointer is within the region contained by the object.
VBScript Syntax
Sub object_ onmouseup(
button,
shift,
x,
y
)
script
End Sub
JScript Syntax
<SCRIPT LANGUAGE="JavaScript" FOR=object EVENT=onmouseup(
button,
shift,
x,
y
) >
script
<SCRIPT>
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.