Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix English language to specific textbox in Arabic Input language mode?

Tags:

c#

.net

winforms

I need to fix the English language as input language even if the user selects Arabic keyboard for particular textbox.

Is it possible?

Once I set the input languae as English, it's changing to all textboxes and labels. But I am looking to fix it to English language for a particular textbox only.

like image 687
Paramu Avatar asked Jun 07 '11 09:06

Paramu


2 Answers

Yes, it's possible using the following in the Windows application.

    private void textBox2_Enter(object sender, EventArgs e)
    {
        System.Globalization.CultureInfo TypeOfLanguage = new System.Globalization.CultureInfo("en-us");
        InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(TypeOfLanguage);
    }
like image 118
DeveloperX Avatar answered Sep 20 '22 05:09

DeveloperX


  this.textBox1.KeyDown += new KeyEventHandler(textBox1_KeyDown); 

You can add KeyEventHandler for your textbox, if you are using the WinForms, and analize the KeyDown event, something like that

like image 34
VMAtm Avatar answered Sep 21 '22 05:09

VMAtm