NETCF - 始终处于最佳状态,但SIP始终存在问题

时间:2011-03-30 23:03:11

标签: compact-framework

如何摆脱那里的SIP按钮?我的表单应该始终位于顶部,通过API SetWindowsPOS设置,但该按钮仍位于顶部?显然,我没有使用任何InputPanel,因为你可以看到... ...

1 个答案:

答案 0 :(得分:0)

我认为操作系统是Windows Mobile 6.5?下面是我在6.5中用来禁用SIP按钮的代码:

public static class SoftInputPanel
{
    const uint SIPF_OFF = 0x0;
    const uint SIPF_ON = 0x1;

    [DllImport("aygshell.dll")]
    static extern uint SHFullScreen(IntPtr hwndRequester, uint dwState);
    private const uint SHFS_HIDESIPBUTTON = 0x0008;
    private const uint SHFS_SHOWSIPBUTTON = 0x0004;
    [DllImport("coredll.dll")]
    private extern static void SipShowIM(uint dwFlag);

    public static void ShowSIP(bool isShow, Control control)
    {
        SHFullScreen(control.Handle, isShow ? SHFS_SHOWSIPBUTTON : SHFS_HIDESIPBUTTON);
        SipShowIM(isShow ? SIPF_ON : SIPF_OFF);
    }

}