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

SHSipPreference (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 SHSipPreference in other DLLs exists, click on Find References to the right.

.
Summary
Set the state of the input panel.

C# Signature:

[DllImport("aygshell.dll", SetLastError=true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SHSipPreference(IntPtr hwnd, SIPSTATE st);

C# User-Defined Types

[Flags()]
public enum SIPSTATE
{
     SIP_UP = 0x0000,
     SIP_DOWN = 0x0001,
     SIP_FORCEDOWN = 0x0002,
     SIP_UNCHANGED = 0x0004
}

VB Signature:

Declare Function SHSipPreference Lib "aygshell.dll" (hwnd as IntPtr, st as Integer) As Bool

Notes:

SIP_UP

A request to display the input panel. Any pending SIP_DOWN requests are ignored.

SIP_DOWN

A request to hide the input panel. When this value is used, a timer is set and the input panel is lowered only after the timer message is received. This approach prevents the input panel from flashing when one control requests SIP_DOWN and another control immediately requests SIP_UP.

SIP_FORCEDOWN

forces the input panel to be hidden immediately, without setting a timer. If you want the input panel hidden and are sure there will be no SIP_UP requests — for example, because your application is a full-screen game — use this value.

SIP_UNCHANGED

tells the system to ignore any pending down requests. That is, if SHSipPreference is called with the SIP_DOWN flag, the system sets a timer and after the timer fires, the input panel is lowered. However, if you call SIP_UNCHANGED before the timer fires, then the input panel will stay in its current location.

Tips & Tricks:

Please add some!

Sample Code:

[DllImport("aygshell.dll", SetLastError=true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SHSipPreference(IntPtr hwnd, SIPSTATE st);

[Flags()]
public enum SIPSTATE
{
     SIP_UP = 0x0000,
     SIP_DOWN = 0x0001,
     SIP_FORCEDOWN = 0x0002,
     SIP_UNCHANGED = 0x0004
}

private void frm_Activated(object sender, EventArgs e)
{
     SHSipPreference(this.Handle, SIPSTATE.SIP_UP);
}
private void frm_Deactivate(object sender, EventArgs e)
{
     SHSipPreference(this.Handle, SIPSTATE.SIP_FORCEDOWN);
}

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