Can anyone give me an idea why the following code doesn't correctly switch input methods when called?
Cheers,
P
Enum InputMode As Integer
IM_SPELL = &H0
IM_AMBIG = &H1
IM_NUMBERS = &H2
End Enum
_
Public Shared Function GetCapture() As IntPtr
End Function
Sub SetInputMode(ByVal InputMode As InputMode, ByVal Control As Windows.Forms.Control)
Const EM_SETINPUTMODE As Integer = &HDE
Dim wparam As New IntPtr(0)
Dim lparam As New IntPtr(InputMode)
Dim message As New Microsoft.WindowsCE.Forms.Message
Dim container As New Microsoft.WindowsCE.Forms.MessageWindow
Control.Capture = True
Dim hWnd As IntPtr = GetCapture()
Control.Capture = False
message.Create(hWnd, EM_SETINPUTMODE, wparam, lparam)
container.PostMessage(message)
End Sub
Cheers,
P
Enum InputMode As Integer
IM_SPELL = &H0
IM_AMBIG = &H1
IM_NUMBERS = &H2
End Enum
Public Shared Function GetCapture() As IntPtr
End Function
Sub SetInputMode(ByVal InputMode As InputMode, ByVal Control As Windows.Forms.Control)
Const EM_SETINPUTMODE As Integer = &HDE
Dim wparam As New IntPtr(0)
Dim lparam As New IntPtr(InputMode)
Dim message As New Microsoft.WindowsCE.Forms.Message
Dim container As New Microsoft.WindowsCE.Forms.MessageWindow
Control.Capture = True
Dim hWnd As IntPtr = GetCapture()
Control.Capture = False
message.Create(hWnd, EM_SETINPUTMODE, wparam, lparam)
container.PostMessage(message)
End Sub







Sign In
Create Account



Back to top









