RFIO.GetEvent
RFIO.GetEventEx

BSTR GetEvent()
BSTR GetEventEx(BSTR szBtnPad)

Function GetEvent() As String
Function GetEventEx(
szBtnPad As String) As String

Get a single user input (function, keyboard, barcode).

Return value
A string that contains the user input. Empty if an error occurs.
The values returned by the function keys (type WLCOMMANDTYPE) are :
"1"=[F1], ..., "9"=[F9], "10"=[F0].
"21"=[Up Arrow], "22"=[Left Arrow], "23"=[Right Arrow], "24"=[Down Arrow]

Parameters

szBtnPad
    In WCE clients, a specific button pad to use.
    Otherwise uses "_Event" Button Pad.

Remarks
Before processing the returned string, check any error condition and the input type.
Sets the variables accessed by RFGetLastError, LastInputType, LastBarcodeType.
The string returned by [F1] is "1" (type WLCOMMANDTYPE), the  string returned by [1] key is "1" (type WLKEYTYPE).
GetEvent returns always a single key.
If the [CLR] (ESC - 0x1B - 27) key is pressed, the LastInputType is WLKEYTYPE. Note that in RFInput the [CLR] (ESC - 0x1B - 27) key returns a WLCOMMANDTYPE.

Example
Public wsRfIo As New RFIO
Dim sBuff As String
Dim iRes As Integer
Dim iBc As Integer

Public Sub Main()
   sBuff = wsRfIo.GetEvent()       ' Get the data
   iRes = wsRfIo.RFGetLastError()  ' Get the error code
   if iRes <> WLNOERROR Then
      If wsRfIo.LastInputType = WLCOMMANDTYPE Then
         ' A function key here
      End If
      If wsRfIo.LastInputType = WLKEYTYPE Then
         ' A normal Keyboard input or CLR key here
      End If
      If wsRfIo.LastInputType = WLSCANTYPE Then
         ' A barcode input here
         iBc = wsRfIo.LastBarcodeType
      End If
   Else
      ' Input Error (RF link lost)
   End If
End Sub

See also    RFIO, RFGetLastError, LastInputType, LastBarcodeType, RFInput, RFBUTTON