Hello,

I know that with the following method respectively the statements (including
p/invoke the methods). But how can I switch back from the numeric panel to
the normal panel with the letters? - because when i once switch with this
method to the numeric panel I have to click on the 123 on the keyboard to get
back to the letter panel. But when the user clicks on a textbox where he has
to type in letters the keyboard should automatically back to the letter input
panel. Does anybody know how that work?
Below is the method for activation the numeric input panel:

private void button1_Click(object sender, System.EventArgs e)
{
// Show panel if it is not shown yet
if ( !inputPanel1.Enabled )
{
inputPanel1.Enabled = true;
Application.DoEvents();
}
// Ensure that keyboard and not some of the other IMs is active
Guid clsidKbdIM = new Guid("{42429667-ae04-11d0-a4f8-00aa00a749b9}");
SipSetCurrentIM(clsidKbdIM.ToByteArray());

// Find the SIP window
IntPtr hWnd = FindWindow("SipWndClass", null);
// Go one level below as the actual SIP window is a child
hWnd = GetWindow(hWnd, GW_CHILD);
// Obtain its context and get a color sample
// The premise here is that the numeric mode is controlled by a virtual
button in the top left corner
// Whenever the numeric mode is active, the button background will be of
COLOR_WINDOW_TEXT
IntPtr hDC = GetDC(hWnd);
int pixel = GetPixel(hDC, 2, 2);
// Notice that we cannot simply compare the color to the system color as
the system color is 24 bit (or palette)
// and the real color is dithered to 15-16 bits for most devices, so white
(0xff, 0xff, 0xff) becomes
// almost white (oxf8, 0xfc, 0xf8)
int clrText = (SystemColors.Window.R) | (SystemColors.Window.G << 8) |
(SystemColors.Window.B << 16);
SetPixel(hDC, 2, 2, clrText);
int pixelNew = GetPixel(hDC, 2, 2);
// Restore the original pixel
SetPixel(hDC, 2, 2, pixel);

if ( pixel == pixelNew )
{
// Simulate stylus click
Message msg = Message.Create(hWnd, WM_LBUTTONDOWN, new IntPtr(1), new
IntPtr(0x00090009));
MessageWindow.SendMessage(ref msg);
msg = Message.Create(hWnd, WM_LBUTTONUP, new IntPtr(0), new
IntPtr(0x00090009));
MessageWindow.SendMessage(ref msg);
}
// Free resources
ReleaseDC(hWnd, hDC);
}

mathon