What the negative impacts of setting ImeMode to Off

只愿长相守 提交于 2019-12-10 11:41:45

问题


I've got a Winforms application that I am in the process of translating into Chinese. I've got a numeric text box that validates the input with a regular expression. When the user is entering text with IME, numeric digits don't seem to come in as numeric digits.

On possible work around I have found is to set the ImeMode property of the text box to 'Off'. In my testing, this makes everything correctly, but I don't have a ton of experiance with IMEs.

What are the negative impacts of setting the ImeMode to Off? Is this something I should avoid at all costs or is it ok if the only things the user can enter are numbers?


回答1:


According to the MSDN documentation, it is OK to turn off the IME for a numeric field.

An IME is a program that enables users to enter complex characters and symbols, such as Japanese Kanji characters, using a standard keyboard. The ImeMode property is typically set to ImeMode.Off for a TextBox control that is intended to only enter numeric values.



来源:https://stackoverflow.com/questions/2203433/what-the-negative-impacts-of-setting-imemode-to-off

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!