DarkBASIC Professional Help File

DX11 SET CAPTURE CHARACTER ACTION

Using this function you can determine how certain input characters are to be handled if provided by the user.
You can for example disable certain characters so that only numbers can be input, or you can make the string capture
automatically terminate when the return key is pressed.
The default behaviour is that all characters are considered accepted input and will be appended to the string.
The following are the available key actions that can be set (the constants are declared in DX11Constants.dba):

- CCA_ACCEPT (value of 0) - accept the character and append it to the string currently being captured
- CCA_IGNORE (value of 1) - ignore the character and do not append it to the string currently being captured
- CCA_TERMINATE (value of 2) - do not append the character to the string and terminate string capturing, thus disregarding any following input until manually enabled again

Syntax

    DX11 SET CAPTURE CHARACTER ACTION character, keyAction

Parameters

    character

> Byte
> The character for which to set the capture action; take note that this is an ASCII character code (what the asc function returns) and not a VK_XXX constant!

    keyAction

> Dword
> The action to take when the specified character is input. Use one of the values listed above; no other values are valid.

Returns

This function does not return a value.

See also

INPUT Functions Menu
DX11 Function Categories