Skip to content

Instantly share code, notes, and snippets.

@anshumanatri
Created March 9, 2009 09:29
Show Gist options
  • Save anshumanatri/76189 to your computer and use it in GitHub Desktop.
Save anshumanatri/76189 to your computer and use it in GitHub Desktop.
public virtual void showContext(IServiceProvider svcProvider, IntPtr pvaIn)
{
object vData = Marshal.GetObjectForNativeVariant(pvaIn);
UInt32 point = (UInt32)vData;
short x = (short)(point & 0x0000ffff);
short y = (short)((point & 0xffff0000) >> 16);
this.ContextMenuStrip.Show(x, y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment