Tap and hold problems

G

Guest

Hi

I'm developing a C# app for WinCE .net 4.1 with CompactFramework.
I need to make use of the MouseDown and MouseUp events of a button i.e. an action must be started when the button is pressed and it must be stopped when the button is released. No problem when using a mouse. But when using the stylus the following problem occurrs: When the button is pressed the MouseDown event is fired as expected. After 400 ms a MouseUp event is fired followed by a right-click event. I assume WinCE 4.x uses this to emulate a right-click by tap-and-hold. For my app this completely unwanted. Note that after the unwanted events are fired the stylus input seems to be dead. There are no more MouseMove events and no MouseUp event when the stylus is released.
I guess the main question is how to disable tap-and-hold for WinCE 4.x. All I found was a registry setting that doubles the tap-and hold time from 400 ms to 800 ms.
 
G

Ginny Caughey [MVP]

HiBert,

You might consider using the ApplicationEx class from OpenNetCF.org so your
app has control over any Windows messages that you choose to handle.
--
Ginny Caughey
..Net Compact Framework MVP

HiBert said:
Hi,

I'm developing a C# app for WinCE .net 4.1 with CompactFramework.
I need to make use of the MouseDown and MouseUp events of a button i.e. an
action must be started when the button is pressed and it must be stopped
when the button is released. No problem when using a mouse. But when using
the stylus the following problem occurrs: When the button is pressed the
MouseDown event is fired as expected. After 400 ms a MouseUp event is fired
followed by a right-click event. I assume WinCE 4.x uses this to emulate a
right-click by tap-and-hold. For my app this completely unwanted. Note that
after the unwanted events are fired the stylus input seems to be dead. There
are no more MouseMove events and no MouseUp event when the stylus is
released.
I guess the main question is how to disable tap-and-hold for WinCE 4.x.
All I found was a registry setting that doubles the tap-and hold time from
400 ms to 800 ms.
 
G

Guest

Ginny, thank you for your response

I have tried that but I could not get any additional messages regarding MOUSE_UP / MOUSE_DOWN events
I assume the (OEM provided) touch driver provides raw touch panel data to some CE-internal touch driver module (which would scale the raw touch panel co-ordinates to windows co-ordinates and generate appropriate windows events. To me it seems that this CE-internal driver module also does this "right click simulation" and therefore - once a "tap and hold" is detected only the mouse-up and right-click events are fired and further processing of raw touch panel input data is stopped until the stylus has been released
From some other source I found that this behaviour is caused by the aygshell library being linked into the CE image. This could make sense. I found some posts on the internet of people that complain about "tap and hold" not being available on their system. Maybe they have a CE-build without aygshell. Now my problem is that on our hardware I do not have any influence on the CE image (it is a XScale board from Advantech). Can anyone confirm this
 
G

Ginny Caughey [MVP]

You could be right. I work with a CE 4.1 device that doesn't support tap and
hold myself. One last thing you might try is using the Spy utility that
comes with eVC to see all the Windows messages that you do get.
--
Ginny Caughey
..Net Compact Framework MVP

HiBert said:
Ginny, thank you for your response.

I have tried that but I could not get any additional messages regarding MOUSE_UP / MOUSE_DOWN events.
I assume the (OEM provided) touch driver provides raw touch panel data to
some CE-internal touch driver module (which would scale the raw touch panel
co-ordinates to windows co-ordinates and generate appropriate windows
events. To me it seems that this CE-internal driver module also does this
"right click simulation" and therefore - once a "tap and hold" is detected
only the mouse-up and right-click events are fired and further processing of
raw touch panel input data is stopped until the stylus has been released.
From some other source I found that this behaviour is caused by the
aygshell library being linked into the CE image. This could make sense. I
found some posts on the internet of people that complain about "tap and
hold" not being available on their system. Maybe they have a CE-build
without aygshell. Now my problem is that on our hardware I do not have any
influence on the CE image (it is a XScale board from Advantech). Can anyone
confirm this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top