473,378 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Changing the default language in specific textBox

Hi,

my user default language is hebrew but in some cases i want that the default
language in specific textBox will be english (i mean that when the user will
hit the 'T' key he will get a T in the textBox and not the parallel letter in
hebrew) what is the best way to do it? i can always check which letter the
user hit and then change it to the english parallel in the keyboard, but i
don't think this is the best way.

thanks,
Gidi.
Nov 17 '05 #1
4 7438
Gidi,

To my knowledge, the culture/language settings are specific to the
thread, not to individual controls. Because of this, you would have to do
exactly what you mentioned, which would be to monitor the keys and provide
your own mappings between the keys and the letters displayed by the textbox.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gidi" <sh*****@hotmail.com.dontspam> wrote in message
news:2A**********************************@microsof t.com...
Hi,

my user default language is hebrew but in some cases i want that the
default
language in specific textBox will be english (i mean that when the user
will
hit the 'T' key he will get a T in the textBox and not the parallel letter
in
hebrew) what is the best way to do it? i can always check which letter the
user hit and then change it to the english parallel in the keyboard, but
i
don't think this is the best way.

thanks,
Gidi.

Nov 17 '05 #2
Hi Nicholas,

I tried to that and i'm having a problem, i can't make the textBox to
display the text right.
this is my function:

private void neshek_num_txt_KeyUp(object
sender,System.Windows.Forms.KeyEventArgs e)
{
if(e.KeyCode!=Keys.Enter && e.KeyCode!=Keys.Alt && e.KeyCode!=Keys.Tab)
{
string temp=neshek_num_txt.Text.Trim();
string let="";
int len=temp.Length;
string new_line="";
if(len>0)
let=mf.Change_Langauge(temp[len-1].ToString());
for(int i=0;i<len-1;i++)
new_line=new_line+temp[i].ToString();
new_line=new_line+let;
neshek_num_txt.Text=new_line;

}

}

the function Change_Langauge() gets the hebrew letter and returns the
parallel letter on the keyboard.
my problems are:
1. sometimes it takes the computer lots of time to respond (like it gets
into a loop) and only by hiting ctrl+akt+del releases it.
2. if i pressed C and Z i get only the hebrew letter of Z.

what is wrong in my function? how can i make the cursor to be at the end of
the line?

Thanks,


Nov 17 '05 #3
You can detect an English character if the current language setting is Hebrew. What you can do - is
when the textbox gets focused, change the keyboard to English, and back to Hebrew (or better yet save
and restore whatever the user had) on exit.

I have English, Russian, Greek, German, and Arabic installed on my system and many applications
that work in multiple languages.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/
Nov 17 '05 #4
Thanks, but how can i do it?

"Chad Z. Hower aka Kudzu" wrote:
You can detect an English character if the current language setting is Hebrew. What you can do - is
when the textbox gets focused, change the keyboard to English, and back to Hebrew (or better yet save
and restore whatever the user had) on exit.

I have English, Russian, Greek, German, and Arabic installed on my system and many applications
that work in multiple languages.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

63
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang...
1
by: Raphael Iloh | last post by:
Hi all, I have a Web Setup Project and would like to change the installation path from the default (i.e. C:\Inetpub\wwwroot\) to some more particular path (e.g. c:\myfolder\). Any ideas on this...
0
by: Gidi | last post by:
Hi, i'm writing this question again, since i didn't get an answer in the reply i wrote, i hope it's ok. My user default language is hebrew and in some specific TextBoxs i want that the...
1
by: Gidi | last post by:
Hi, I have a TextBox, and i want that when ever it gets focused i will call an event who preform like ALT + SHIFT (meaning, change the language of the textbox). What i actually need is, to make...
3
by: ABC | last post by:
How to set first focus on specific textbox?
3
by: Gidi | last post by:
Hi, I've a form with few TextBoxes and in all i'm writing in language A except one which i want to write in language B (both A and B are installed on my PC). how can I make the specific textBox...
2
by: cyberco | last post by:
Using: WM5 PPC, .NetCF 2, C#, Visual Studio 2005 OK, I figured out how to add resources.resx files for different languages/cultures for both my Frames and my project at large. But how can I...
3
by: menakavenkatesh | last post by:
i want simple coding for changing fontsize of the texbox
6
by: aeris | last post by:
Hello, I'm a beginner of using C#. I'm creating a window application, May I know how to clear the default text on textbox when I click directly on the textbox? For example, the txtBox has the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.