本文整理汇总了C#中System.Windows.Forms.InputLanguageChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# InputLanguageChangedEventArgs类的具体用法?C# InputLanguageChangedEventArgs怎么用?C# InputLanguageChangedEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InputLanguageChangedEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了InputLanguageChangedEventArgs类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RichTextBox
//引入命名空间
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
public class Form1 : System.Windows.Forms.Form
{
RichTextBox rtb = new RichTextBox();
public Form1()
{
this.Controls.Add(rtb);
rtb.Dock = DockStyle.Fill;
this.InputLanguageChanged += new InputLanguageChangedEventHandler(languageChange);
}
private void languageChange(Object sender, InputLanguageChangedEventArgs e)
{
// If the input language is Japanese.
// set the initial IMEMode to Katakana.
if (e.InputLanguage.Culture.TwoLetterISOLanguageName.Equals("ja"))
{
rtb.ImeMode = System.Windows.Forms.ImeMode.Katakana;
}
}
public static void Main(string[] args)
{
Application.Run(new Form1());
}
}