Problem with the Soft Input Panel (SIP)

M

Manfred Denzer

Hello,

I have a problem with the "Soft Input Panel" (SIP). Please have a look
at this screenshot of my application:
http://img517.imageshack.us/img517/668/sipproblemzu9.png

I have an own button to show the SIP. But if a click on this button, a
second default button appears. Is it possible to deactivate the
default SIP button?

And a second question: How can I check, if the SIP is currently shown
or hide?

Thank you very much for your help!
Greetings, Manfred




[DllImport("coredll.dll")]
private static extern int SipShowIM(SIPStatus i);
[DllImport("coredll.dll")]
private static extern bool SipSetInfo(ref SIPINFO pSipInfo);
[DllImport("coredll.dll")]
private static extern bool SipGetInfo(ref SIPINFO pSipInfo);

private enum SIPStatus
{
SIPF_OFF = 0,
SIPF_ON = 1
}
private struct SIPINFO
{
public Int32 cbSize;
public Int32 fdwFlags;
public RECT rcVisibleDesktop;
public RECT rcSipRect;
public Int32 dwImDataSize;
public Int32 pvImData;
}

private struct RECT
{
public Int32 left;
public Int32 top;
public Int32 right;
public Int32 bottom;
}

public Boolean isVisible() {
return pvtVisible;
}

public void SetPosition(Int32 top)
{
SIPINFO mySi = new SIPINFO();
bool result = true;
mySi.cbSize =
System.Runtime.InteropServices.Marshal.SizeOf(typeof(SIPINFO));
result = SipGetInfo(ref mySi);
mySi.rcSipRect.top = top;
mySi.rcSipRect.bottom = top + 80;
result = SipSetInfo(ref mySi);
}

public void show()
{
SipShowIM(SIPStatus.SIPF_ON);
}

public void hide()
{
SipShowIM(SIPStatus.SIPF_OFF);
}
 
P

Peter Foot

You'll need to P/Invoke the SHFullScreen function. One of the flags you can
pass in allows you to enable/disable the SIP button. You'll find you need to
call this function any time the form is activated not just the first time
you show it or the button will often creep back in. You should be able to
find numerous P/Invoke definitions for this function either in the archives
of this group or on the web.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - Software Solutions for a Mobile World
In The Hand Ltd - .NET Components for Mobility
 
M

Manfred Denzer

Thank you very much for your answer!
If works! I get the button with FindWindowW("MS_SIPBUTTON", null) and
move it out of the window with MoveWindow.

Greetings, Manfred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top