Microsoft® .NET Compact Framework (Core Reference)
by Andy Wigley, Stephen Wheelwright, Robert Burbidge, Rory MacLoed, Mark Sutton
Handling the Tap-and-Hold Event
Because a Pocket PC device does not have a mouse, users cannot right-click a control. Instead, they must tap the control with the stylus and then hold the stylus in place until the context-sensitive menu is displayed. To provide context-sensitive menus for your controls, you use the ContextMenu control. The ContextMenu control is described in Chapter 3.
If you want to provide functionality other than a context-sensitive menu to the tap-and-hold action on a control, you must trap the action manually. You should create a timer control on your form and set its interval to the amount of time you want the user to hold the stylus for before triggering your function. Capture the MouseDown event to start the timer and the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access