Input Method Editor (IME) Isn't Working!
- I'm trying to support multi-language input in my game. The game does not use any controls other than its own form. How can I invoke an IME dialog to pop-up when the user enters a character?
Inaddition, is it an IME dialog that I want to use -- as a I believe a mod here said that IME will not work on the Japanese version of Vista. If this is true, what should I be using instead? Text Services Framework?
All Replies
- Bump.
Hi!
Are you still having this issue? IME should work out of the box for Winforms controls regardless the OS it is running on. The IME window shows up once you install it in the system. You do that from the Language Settings control panel. Once you have IME installed, the IME composition window appears when the IME mode is set to one of the native input mode, like Hiragana for Japanese or On for Chinese or Hangul for Korean. You can do this by either, changing the mode interactively or changing the ImeMode property on the Form or a particular control depending on what you what the behavior to be.
Hope this helps and it is not too late,
- Hello Miguell,
I had found a solution by p/invoking the Win32 imm32.dll functions. You are not correct; the IME does not function on a form that has no controls other than the form itself (the form is a control). There is no way to get the IME working on just a blank form, otherwise.
I welcome you to try and get IME working on a form that has no controls without using the Win32 imm32.dll, as I'm finding it rather tedious to explain the same stupid s*it on every MSDN request I had made because people can't spend ten minutes testing it out for themselves.
OBVIOUSLY I HAD TRIED SETTING IMEMODE ON THE FORM, WHAT ARE YOU THINKING? There are some aspects of the IME feature in Winforms that I would like to share with you:
1. The IME context is enabled by default only on controls that that are IME-aware, meaning they can receive IME input like TextBox. Form is not an IME-aware control.
2. However, the ImeMode property in Forms is very important because controls inside the form that don't have the ImeMode property set explicitly will inherit their value from the Form. The ImeMode property is an ambient property.
3. In order to enable IME for IME-unaware controls you will need to override the Control.CanEnableIme property and return true. But for this you will need to either install a QFE that we recently shipped (I don't have the QFE info with me right now) or wait for the release of Orcas.
4. PInvoking into the native IME API is not supported by winforms since it may interfere with the winforms internal IME state, hence it is not recommended.
hope this helps,
- 1. Already knew that.
2. Already knew that; infact, I don't even know why you are sharing this. I have a blank form! BLANK!
3. You mean this one from March 2007?
http://support.microsoft.com/kb/934197
a) It appears to patch the System.Windows.Forms.dll, meaning all my clients would need the patch aswell; this is not convenient.
b) It appears the intentions of the patch are to support IME in user-controls. As stated:"After you apply this hotfix, the container control can override the CanEnableIme property to return a value of true. Then, the container control can access the native IME API.", as such, it may not enable IME on an empty form.
4. Given that my blank form is not an IME-Aware control, I'll take my chances. Especially considering that there doesn't appear to be any other solutions.
>hope this helps,
It doesn't. You are wasting my time, and yours. If you want to be helpful, get a solution working and post it. Similar issue, I suspect: I have IE7 and use the IME hotkey (Shift-Control) to shift between languages (English and Russian). But for the past few months, the IME hotkey doesn't respond (only affects IE7). I had used MKLC to create a slightly altered Russian keyboard. Could that be the issue?
I know that in IE7 beta, IME hotkey control was an issue. It was supposedly fixed. But apparently not entirely.
-Rich


