Inputlanguage object usage restrictions in Dot Net

Source: Internet
Author: User
Tags dot net

In dot net, the inputlanguage object is "Provide methods and fields to manage the input language. This class cannot be inherited ."

The installedinputlanguages method in the inputlanguage object obtains the input method installed by the system. The currentinputlanguage method obtains or sets the current input method. The defaultinputlanguage method obtains the default input method of the system. You can use the three methods of the inputlanguage object to set the specified input method.

HoweverProgramWhen it is used by others, an error is accidentally reported on one of the machines. Because the program has been compiled and is not with the author, I only know that there is a problem with the inputlanguage object, but the specific error number is unknown.

After remotely watching the error message via QQ, I felt that he did not install the Chinese input method. However, he clearly installed the input method, such as sogou and QQ pinyin. The input method is also normal.

Intuitively, view his "text service and input language" window. Normally, it should be like the following.

Unexpectedly, This is blank on his computer. The following message is displayed: "The incompatible keyboard driver is detected. This dialog box has been disabled ".

I searched for a solution on the Internet. For various reasons, the contents under the key value of HKEY_LOCAL_MACHINE \ systemcurrentcontrolset \ Control \ keyboard layouts in the system registry are all deleted.

For more information, see "blank text service and input language options ".

Follow the above method to import the missing registry to his system. OK! Solved. No error is reported.

It can be seen that the inputlanguage object controls the input method by accessing the registry. If the registry content is incorrect. This leads to errors.

However, it is hard to understand why a registry error occurs, but the input method can be used normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.