5

I am looking for some advice on handling WM 6.5 Gestures in a C# 2.0 Application. Currently things like pan and scroll are interfering with controls like the Tab Control and listviews.

Is there a way to catch these using C# 2.0 and handling them? I've been looking at the MSDN wrappers etc but these are built using .Net 3.5 and wont work with my application and I keep getting errors.

Thanks for your help in advance,

Morris

Rowland Shaw
  • 37,700
  • 14
  • 97
  • 166
Morrislgn
  • 3,717
  • 4
  • 24
  • 26

2 Answers2

2

Using Gestures in Windows Mobile 6.5

try this

Alessandro Annini
  • 1,531
  • 2
  • 17
  • 32
  • I read through this and used the OpenNetCF to catch the gestures and disable them throughout the application which seemed the best way to do what I needed. Thanks for the help tho! – Morrislgn Dec 22 '09 at 10:50
  • @MorrisIgn, is it possible for you to show how you did it? I am using OpenNetCF's NativeWindow and overriding WndProc and trying to intercept WM_GESTURE, but no luck so far. Any hints would be appreciated. – Andreas Paulsson Sep 29 '11 at 08:02
2

Why don't use "DisableGestures" function from coredll.dll ?

[DllImport("coredll.dll")]
private static extern bool DisableGestures(IntPtr p_ipHwnd, UInt64 p_uiTGFflags, uint p_uiScope);

private const UInt64 TGF_GID_BEGIN        = 0x0000000000000002;
private const UInt64 TGF_GID_END          = 0x0000000000000008;
private const UInt64 TGF_GID_PAN          = 0x0000000000000100;
private const UInt64 TGF_GID_ROTATE       = 0x0000000000000200;
private const UInt64 TGF_GID_SCROLL       = 0x0000000000001000;
private const UInt64 TGF_GID_HOLD         = 0x0000000000002000;
private const UInt64 TGF_GID_SELECT       = 0x0000000000004000;
private const UInt64 TGF_GID_DOUBLESELECT = 0x0000000000008000;
private const UInt64 TGF_GID_LAST         = 0x0000000000008000;
private const UInt64 TGF_GID_MAX          = 0x8000000000000000;
private const UInt64 TGF_GID_ALL          = 0xFFFFFFFFFFFFFFFF;

private const uint TGF_SCOPE_WINDOW  = 0x0000;
private const uint TGF_SCOPE_PROCESS = 0x0001;

public frmMain()
{
  InitializeComponent();

  DisableGestures(null, TGF_GID_ALL, TGF_SCOPE_PROCESS);
}

You can also try to disable gestures for only one window.

Jean-Daniel Gasser
  • 496
  • 2
  • 8
  • 16