Partager via


Ambient Event Attributes

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The following attributes are common to all skin events. They are accessed with the event keyword within an event handler for the element.

Attribute Description
altKey Retrieves a value indicating whether the ALT key was down when the event occurred.
button Retrieves a value indicating which mouse buttons were down when the event occurred.
clientX Retrieves the x-coordinate of the mouse pointer with respect to the client region of the application window.
clientY Retrieves the y-coordinate of the mouse pointer with respect to the client region of the application window.
ctrlKey Retrieves a value indicating whether the CTRL key was down when the event occurred.
fromElement Retrieves the element the event came from.
keyCode Retrieves the ASCII key code if a key was pressed when the event occurred.
offsetX Retrieves the x-coordinate of the mouse pointer with respect to the element firing the event.
offsetY Retrieves the y-coordinate of the mouse pointer with respect to the element firing the event.
screenHeight Retrieves the height of the available screen size in pixels.
screenWidth Retrieves the width of the available screen size in pixels.
screenX Retrieves the absolute x-coordinate of the mouse pointer with respect to the screen.
screenY Retrieves the absolute y-coordinate of the mouse pointer with respect to the screen.
shiftKey Retrieves a value indicating whether the SHIFT key was down when the event occurred.
srcElement Retrieves the element that fired the event.
toElement Retrieves the element the keyboard focus moved to.
x Retrieves the x-coordinate of the mouse pointer with respect to the application window.
y Retrieves the y-coordinate of the mouse pointer with respect to the application window.

 

Skin Programming Reference