Simulate a tap with the stylus

  • Thread starter Thread starter Michael Bickel
  • Start date Start date
M

Michael Bickel

Hello,

has anybody some vb.net code-snippets how i can simulate a tap with the
stylus (like the ActiveSync Remote Display do) on a Windows Mobile 2003
device ?

Thanks...

Michael
 
You need to P/Invoke mouse_event function

<DllImport("coredll")> _
Shared Sub mouse_event(dwFlags as Int32, dx as Int32, dy as Int32, dwData as
Int32, dwExtraInfo as Int32)
End Sub

dwFlags could be one of
MOUSEEVENTF_MOVE = 1
MOUSEEVENTF_LEFTDOWN = 2
MOUSEEVENTF_LEFTUP = 4

it should be ORed with
MOUSEEVENTF_ABSOLUTE = &H8000

dx and dy are screen coordinates

dwData and dwExtraInfo should be set to 0
 
Alex said:
You need to P/Invoke mouse_event function

<DllImport("coredll")> _
Shared Sub mouse_event(dwFlags as Int32, dx as Int32, dy as Int32, dwData as
Int32, dwExtraInfo as Int32)
End Sub

dwFlags could be one of
MOUSEEVENTF_MOVE = 1
MOUSEEVENTF_LEFTDOWN = 2
MOUSEEVENTF_LEFTUP = 4

it should be ORed with
MOUSEEVENTF_ABSOLUTE = &H8000

dx and dy are screen coordinates

dwData and dwExtraInfo should be set to 0
Tanks, Alex. Works perfect.

Michael
 
Back
Top