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);
}
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);
}