Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

SHRecognizeGesture (aygshell)
 

aygshell is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for SHRecognizeGesture in other DLLs exists, click on Find References to the right.

.
Summary
Recognize tap-and-hold on Pocket PC

C# Signature:

[DllImport("aygshell.dll")]
static extern uint SHRecognizeGesture(ref SHRGINFO shrg);

VB .NET Signature:

Declare Function SHRecognizeGesture Lib "aygshell.dll" (shrg As SHRGINFO) As Integer

User-Defined Types:

[StructLayout(LayoutKind.Sequential)]
class SHRGINFO
{
   public uint cbSize = 0;
   public IntPtr hwndClient = IntPtr.Zero;
   public int x = 0; // POINT
   public int y = 0; // POINT
   public uint dwFlags = 0;
}

Constants:

const uint GN_CONTEXTMENU = 1000;
const uint SHRG_RETURNCMD = 0x00000001;
const uint SHRG_NOTIFYPARENT = 0x00000002;
const uint SHRG_LONGDELAY = 0x00000008;
const uint SHRG_NOANIMATION = 0x00000010;

Notes:

None

None.

Tips & Tricks:

Please add some!

Sample Code:

Use this in conjunction with the SetCapture/GetCapture HWND sample:

static bool RecognizeGesture(IntPtr hWnd, int x, int y)
{
   SHRGINFO shrginfo = new SHRGINFO();
   shrginfo.cbSize = (uint)Marshal.SizeOf(shrginfo);
   shrginfo.hwndClient = hWnd;
   shrginfo.x = x;
   shrginfo.y = y;
   shrginfo.dwFlags = SHRG_RETURNCMD;
   return SHRecognizeGesture(ref shrginfo) == GN_CONTEXTMENU;
}

Alternative Managed API:

TODO

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions