请问如何实现当前选择的输入法的全角和半角切换; 可以试试控制键盘按键,比如ctrl+空格转换输入法全角和半角,在C#中用程序按这两个按钮 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 internal class ImeContext中的public static void SetImeStatus(ImeMode imeMode, IntPtr handle)最后有这么几句ImeModeConversion.ImeModeConversionBits[imeMode]; IntPtr ptr1 = UnsafeNativeMethods.ImmGetContext(new HandleRef(null, handle)); UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(null, ptr1), ref conversion, ref sentence); conversion |= conversion1.setBits; conversion &= ~conversion1.clearBits; UnsafeNativeMethods.ImmSetConversionStatus(new HandleRef(null, ptr1), conversion, sentence); UnsafeNativeMethods.ImmReleaseContext(new HandleRef(null, handle), new HandleRef(null, ptr1));--------------------------------其中conversion |= conversion1.setBits;就是C#编写的程序一切换输入法就是全角的罪魁祸首如果以conversion |= ((int)imeMode)==4? 1 | imeSharp :conversion1.setBits;替换就正常了所以这句关系全角的问题 以上为反编译代码我以前自己写IME输入时发现的 (当时啃了好久的代码。。)不知道能不能帮的上... http://www.51testing.com/?117006/action_viewspace_itemid_65497.html这里有切换的函数 static StreamWriter WriteLine字体放大或加粗 高手指教啊!!!在线等侯您的到来!!!(C/S) 向各位好人,高手请教关于MDI窗体的问题。。。 如何获取应用程序的参数 在C#中如何获取短文件名? 打包第三方控件 socket编程--客户端积极拒绝连接 Media Service 编成问题,在线结帖。 怎样自动生成一个word文档? 将一段C#代码转换成vb.net后,出现错误,怎么改好? 如何为程序设定一个输入规则
中的
public static void SetImeStatus(ImeMode imeMode, IntPtr handle)
最后有这么几句
ImeModeConversion.ImeModeConversionBits[imeMode];
IntPtr ptr1 = UnsafeNativeMethods.ImmGetContext(new HandleRef(null, handle));
UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(null, ptr1), ref conversion, ref sentence);
conversion |= conversion1.setBits;
conversion &= ~conversion1.clearBits;
UnsafeNativeMethods.ImmSetConversionStatus(new HandleRef(null, ptr1), conversion, sentence);
UnsafeNativeMethods.ImmReleaseContext(new HandleRef(null, handle), new HandleRef(null, ptr1));
--------------------------------
其中conversion |= conversion1.setBits;就是C#编写的程序一切换输入法就是全角的罪魁祸首
如果以conversion |= ((int)imeMode)==4? 1 | imeSharp :conversion1.setBits;替换就正常了所以这句关系全角的问题 以上为反编译代码
我以前自己写IME输入时发现的 (当时啃了好久的代码。。)不知道能不能帮的上...
这里有切换的函数