Click to return to the Reusing Browser Technology home page    
IHTMLEventObj::get_fromEl...     IHTMLEventObj::get_offset...     IHTMLEventObj Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLEventObj::get_keyCode Method


Retrieves the Unicode key code associated with the key that caused the event.

Syntax

HRESULT get_keyCode(
    long *p
);

Parameters

p
Address of a long integer variable that receives the Unicode key code. It can be any key code in the range 1 to 255, or it is 0 if no key caused the event. For details, see the keyCode property.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

If you set this property, the given key code replaces the existing value. Subsequent event handlers receive the new value rather than the original.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

IHTMLEventObj::put_keyCode Method


Sets the Unicode key code associated with the key that caused the event.

Syntax

HRESULT put_keyCode(
    long v
);

Parameters

v
Long integer value that specifies any Unicode key code in the range 1 to 255, or it is 0 if no key caused the event. For details, see the keyCode property.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

If you set this property, the given key code replaces the existing value. Subsequent event handlers receive the new value rather than the original.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.