c# 全半角切换
麻烦各位
我在网上找到一个全半角切换程序如下:
public static void SetHalfShape(Control c)
{
IntPtr hIme = ImmGetContext(c.Handle);
if ( ImmGetOpenStatus(hIme) != 0 ) //如果输入法处于打开状态
{
int iMode = 0, iSentence = 0;
bool bSuccess = ImmGetConversionStatus(hIme, ref iMode, ref iSentence); //检索输入法信息
if (bSuccess)
{
if ((iMode & IME_CMODE_FULLSHAPE) > 0) //如果是全角
{
// ImmSimulateHotKey(this.Handle, IME_CHOTKEY_SHAPE_TOGGLE); //转换成半角
iMode &= (~IME_CMODE_FULLSHAPE);
bSuccess = ImmSet