Examples: IMESetMode

In this example when the user moves the cursor into a field, IME is automatically invoked into HIRAGANA input mode. When the user moves from the field, IME resets to its original status.

Public InitIMEMode As Integer

Sub Entering ( Source As Field )
    InitIMEMode = IMEStatus
    If InitIMEMode <> IME_HIRAGANA Then
        IMESetMode ( IME_HIRAGANA )
    End If 
End Sub
Sub Exiting ( Source As Field )
    If InitIMEMode <> IMEStatus Then
        IMESetMode ( InitIMEMode )
    End If
End Sub