[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
}
Declare Function SHSipPreference Lib "aygshell.dll" (hwnd as IntPtr, st as Integer) As Bool
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.
Please add some!
[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);
}