SipSetCurrentIM (coredll)
Last changed: -211.5.245.142

.
Summary
Set the Input Method

C# Signature:

[DllImport("coredll.dll", SetLastError=true)]
public extern static bool SipSetCurrentIM(byte[] clsid);

VB Signature:

Declare Function SipSetCurrentIM Lib "coredll.dll" (ByVal clsid As Byte()) As Boolean

User-Defined Types:

None.

Alternative Managed API:

Microsoft.WindowsCE.Forms.InputPanel.CurrentInputMethod

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

/// C#
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;

[DllImport("coredll.dll", SetLastError = true)]
public extern static bool SipSetCurrentIM(byte[] id);

public static readonly Guid ClsidKeyboard = new Guid("42429667-ae04-11d0-a4f8-00aa00a749b9");
public static readonly Guid ClsidLargeKB = new Guid("a523dfc7-1a7e-4af6-991a-510e75847828");

bool success = SipSetCurrentIM(ClsidLargeKB.ToByteArray());
if (!success)
{
     int error = Marshal.GetLastWin32Error();    // Equivalent to Win32 GetLastError()
     Debug.WriteLine(string.Format("SipSetCurrentIM failed: error code {0}", error));
}

A VB sample can be found at [http://community.opennetcf.com/forums/p/893/51304.aspx]

Documentation