本文整理匯總了C#中System.Windows.Forms.ImeMode枚舉的典型用法代碼示例。如果您正苦於以下問題:C# ImeMode枚舉的具體用法?C# ImeMode怎麽用?C# ImeMode使用的例子?那麽, 這裏精選的枚舉代碼示例或許可以為您提供幫助。
在下文中一共展示了ImeMode枚舉的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());
}
}