On May 15, 9:58 am, "agvan...@gmail.com" <agvan...@gmail.com> wrote:
> Hi,
> I'm writing an utility in c# under WM6 for HTC Excalibur (qwerty
[quoted text clipped - 4 lines]
>
> thanks !
LOL
just solved it myself via collection of data from several forums,
maybe will be helpful to others:
[DllImport("coredll.dll", EntryPoint = "SendMessage")]
private static extern uint SendMessage(IntPtr hWnd, uint msg,
uint wParam, uint lParam);
[DllImport("coredll.dll", EntryPoint = "GetCapture")]
private static extern IntPtr GetCapture();
[DllImport("coredll.dll", EntryPoint = "GetWindow")]
private static extern IntPtr GetWindow(IntPtr hWnd, int
uCmd);
private const int GW_CHILD = 5;
private const uint EM_SETINPUTMODE = 0x00DE;
private const uint EIM_NUMBERS = 2;
public SetMode() {
textBox1.Capture = true;
IntPtr hWndUser = GetCapture();
hWndUser = GetWindow(hWndUser, GW_CHILD);
textBox1.Capture = false;
SendMessage(hWndUser, EM_SETINPUTMODE, 0, EIM_NUMBERS);
}
Arun - 15 May 2008 16:32 GMT
You should be able to use InputModeEditor class under
Microsoft.WindowsCE.Forms namespace
and call SetInputMode and pass on control and mode as numeric instead
PInvoking,
Take a look at this here,
http://msdn.microsoft.com/en-us/library/microsoft.windowsce.forms.inputmodeedito
r.setinputmode.aspx
Cheers,
Arun
> On May 15, 9:58 am, "agvan...@gmail.com" <agvan...@gmail.com> wrote:
>
[quoted text clipped - 30 lines]
> SendMessage(hWndUser, EM_SETINPUTMODE, 0, EIM_NUMBERS);
> }