WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

EnableFunctionKeys

Call this method to enable or disable the available function keys (F1 - F20, Arrow keys when they're mapped and ESC). This causes the Function Keys controller to never trigger any event on the target form.

Ole declaration

VARIANT_BOOL EnableFunctionKeysByName(LPCTSTR sFormName, VARIANT_BOOL bEnable);

VARIANT_BOOL EnableFunctionKeysById(SHORT usFormId, VARIANT_BOOL bEnable);

Parameters
sFormName
The form's name.
usFormId
The form's id.
bEnable
Specifies if the functions keys will be enabled or not.
Return Value

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

Remarks

By default the function keys are enabled.

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

SetFocus

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