InputLanguageChangedEventArgs InputLanguageChangedEventArgs InputLanguageChangedEventArgs InputLanguageChangedEventArgs Class

定義

InputLanguageChanged イベントのデータを提供します。Provides data for the InputLanguageChanged event.

public ref class InputLanguageChangedEventArgs : EventArgs
public class InputLanguageChangedEventArgs : EventArgs
type InputLanguageChangedEventArgs = class
    inherit EventArgs
Public Class InputLanguageChangedEventArgs
Inherits EventArgs
継承
InputLanguageChangedEventArgsInputLanguageChangedEventArgsInputLanguageChangedEventArgsInputLanguageChangedEventArgs

次の例では、作成、新しいFormにイベント ハンドラーをアタッチし、InputLanguageChangedイベント。The following example creates a new Form and attaches an event handler to the InputLanguageChanged event. このイベントの変更、IMEmode入力言語が日本語に変更されたとき。This event changes the IMEmode when the input language changes to Japanese.

#using <System.Data.dll>
#using <System.Windows.Forms.dll>
#using <System.dll>
#using <System.Drawing.dll>

using namespace System;
using namespace System::Drawing;
using namespace System::Collections;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;
using namespace System::Data;
public ref class Form1: public System::Windows::Forms::Form
{
private:
   RichTextBox^ rtb;

public:
   Form1()
   {
      rtb = gcnew RichTextBox;
      this->Controls->Add( rtb );
      rtb->Dock = DockStyle::Fill;
      this->InputLanguageChanged += gcnew InputLanguageChangedEventHandler( this, &Form1::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;
      }
   }

};

int main()
{
   Application::Run( gcnew Form1 );
}

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());
	}
}
Imports System
Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Data

Public Class Form1
   Inherits System.Windows.Forms.Form
   
   Dim WithEvents rtb As New RichTextBox()
   
   Public Sub New()
      MyBase.New()
      Me.Controls.Add(rtb)
      rtb.Dock = DockStyle.Fill
   End Sub

   Private Sub languageChange( _
      ByVal sender As Object, _
      ByVal e As InputLanguageChangedEventArgs _
   ) Handles MyBase.InputLanguageChanged

      ' If the input language is Japanese.
      ' set the initial IMEMode to Katakana.
      If e.InputLanguage.Culture.TwoLetterISOLanguageName.Equals("ja") = True Then
         rtb.ImeMode = System.Windows.Forms.ImeMode.Katakana
      End If
   End Sub

   Public Shared Sub Main()
      Application.Run(new Form1())
   End Sub

End Class

注釈

データを使用することができます、InputLanguageChangedEventArgsする入力方式エディター (Ime) を変更または右から左の値を交換するかどうかを決定します。You can use the data from the InputLanguageChangedEventArgs to make decisions about whether to change Input Method Editors (IMEs) or swap right-to-left values. 変更することもできます、CurrentCultureスレッドのCurrentUICultureプロパティさまざまなリソース取得されるようにします。You can also change the CurrentCulture of a thread and the CurrentUICulture properties so that different resources get picked up.

InputLanguageChangedEventArgsロケールと、新しい入力言語の文字セットを識別します。An InputLanguageChangedEventArgs identifies the locale and the character set of the new input language.

InputLanguageChangingイベントの前に、InputLanguageChangedイベント。The InputLanguageChanging event precedes the InputLanguageChanged event.

コンストラクター

InputLanguageChangedEventArgs(CultureInfo, Byte) InputLanguageChangedEventArgs(CultureInfo, Byte) InputLanguageChangedEventArgs(CultureInfo, Byte) InputLanguageChangedEventArgs(CultureInfo, Byte)

ロケールと文字セットを指定して、InputLanguageChangedEventArgs クラスの新しいインスタンスを初期化します。Initializes a new instance of the InputLanguageChangedEventArgs class with the specified locale and character set.

InputLanguageChangedEventArgs(InputLanguage, Byte) InputLanguageChangedEventArgs(InputLanguage, Byte) InputLanguageChangedEventArgs(InputLanguage, Byte) InputLanguageChangedEventArgs(InputLanguage, Byte)

入力言語と文字セットを指定して、InputLanguageChangedEventArgs クラスの新しいインスタンスを初期化します。Initializes a new instance of the InputLanguageChangedEventArgs class with the specified input language and character set.

プロパティ

CharSet CharSet CharSet CharSet

新しい入力言語に関連付けられている文字セットを取得します。Gets the character set associated with the new input language.

Culture Culture Culture Culture

入力言語のロケールを取得します。Gets the locale of the input language.

InputLanguage InputLanguage InputLanguage InputLanguage

入力言語を示す値を取得します。Gets a value indicating the input language.

メソッド

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

指定したオブジェクトが、現在のオブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

既定のハッシュ関数として機能します。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

現在のインスタンスの Type を取得します。Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

現在のオブジェクトを表す文字列を返します。Returns a string that represents the current object.

(Inherited from Object)

適用対象

こちらもご覧ください