Smartphone 2003 & vb.net - Sending Windows Messages?

  • Thread starter Thread starter Paul Sneddon
  • Start date Start date
You are posting message to a wrong window. Try this:

Imports System.Runtime.Interop

Const EM_SETINPUTMODE As Integer = &HDE
Const EM_GETINPUTMODE As Integer = &HDD
Dim wparam As New IntPtr(0)
Dim lparam As New IntPtr(2)
Dim newmsg As New Microsoft.WindowsCE.Forms.Message
Dim test As New Microsoft.WindowsCE.Forms.MessageWindow

MyEditControl.Capture = True
Dim hWnd as IntPtr = GetCapture()
MyEditControl.Capture = False

newmsg.Create(hWnd, EM_SETINPUTMODE, wparam, lparam)
test.PostMessage(newmsg)

<DllImport("coredll">_
Shared Function GetCapture() as IntPtr
End Function
 
Thanks, I knew there must of been a way to get handles :)

However I can't get the inputmode to change and I'm sure I'm using the
correct vaules as I got them from the header file.

Any Ideas,
Paul
 
I can confirm that this does not work with the emulator, nor does P/Invoking
SendMessage.
 
I was hoping the EM_SETINPUTMODE will work, but had some suspicions. Let me
look into it and I'll get back top you.
 
Back
Top