WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

MapArrowKeysToFunctionKeys

This method allows to change the behavior of the arrow keys. If the mapping of the arrow keys is enabled, every time a arrow key is pressed, a function key event will be triggered (See GetLastEventType ).

Ole declaration

VARIANT_BOOL MapArrowKeysToFunctionKeysByName(LPCTSTR sFormName, VARIANT_BOOL bMapArrowKeys);

VARIANT_BOOL MapArrowKeysToFunctionKeysById(SHORT usFormId, VARIANT_BOOL bMapArrowKeys);

Parameters
sFormName
The form's name.
usFormId
The form's id.
bMapArrowKeys
Specifies if the arrow keys mapping is enabled or disabled.
Return Value

On success, MapArrowKeysToFunctionKeys returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.

Remarks

If the arrow keys are mapped to function keys, one of the following constants will be received on the integer value of the event triggered (See GetLastEventIntValue):

Example
C#
using WirelessStudioOleWidgets;
WStFactory oFactory = new WStFactory();
WStForm oForm = new WStForm ();
short formId = 10;
oFactory.CreateFormById(formId);
oForm.MapArrowKeysToFunctionKeyById(formId, true);
Visual Basic 6 (Full Example: FieldDemoModule.bas.txt)
Public wsForm As New WStForm
...
Case "mapArrowKeysCheckBox"
	If wsForm.GetLastEventIntValue() = WS_STATE_CHECKED Then
		wsForm.MapArrowKeysToFunctionKeysByName "myForm", True
	Else
		wsForm.MapArrowKeysToFunctionKeysByName "myForm", False
	End If
...	
See also

EnableFunctionKeys

WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference