Groups | Blog | Home
all groups > dotnet compact framework > october 2004 >

dotnet compact framework : Simulate User Input


Andrej
10/28/2004 4:09:02 PM
Hi there,
I'm writing a small app for the PocketPC 2003 using C#. My app should simply
open the Calculator and simulate some key presses (of course im using
P/Invoke). Opening the calc.exe was no problem, but I can't get the 'magic'
input work correctly. By using 'mouse_event' for simulating user input, the
upper left 'Start' button is being pressed (seems strange 'cause I thing the
handle to the Calculator is O.K.) and using 'PostMessage' and 'SendMessage'
have no effect at all.
Alex Feinman [MVP]
10/28/2004 4:44:27 PM
I'm sure the problem of simulating the stylus input can be helped (I do it
it slightly differently, see
http://www.alexfeinman.com/download.asp?doc=IMSwitch.zip for a sample that
turns on numeric mode on the soft keyboard), but I think you are approaching
it in a wrong way.

If all you need is to drive calc.exe, use keyboard input - by sending
WM_KEYDOWN and WM_KEYUP (or maybe even WM_CHAR) you can do all you need with
the calc

--
Alex Feinman
---
Visit http://www.opennetcf.org
[quoted text, click to view]

Andrej
10/28/2004 5:46:02 PM
Hi Alex,
that's exactly what a newbie like me has been searching for.
Thank you very much.
Kind Regards
Andrej

[quoted text, click to view]
AddThis Social Bookmark Button