Well I have multiple keyboard layouts installed in my system..
I have written a program in C# such that the required input language can be
selected using the following piece of code
InputLanguage[] lang = new
InputLanguage[InputLanguage.InstalledInputLanguages.Count];
private void Form1_Load(object sender, EventArgs e)
{
richTextBox1.LanguageOption =
RichTextBoxLanguageOptions.AutoKeyboard;
InputLanguage.InstalledInputLanguages.CopyTo(lang, 0);
foreach (InputLanguage l in lang)
{
comboBox1.Items.Add(l.Culture.EnglishName);
}
comboBox1.SelectedIndex =
comboBox1.Items.IndexOf(InputLanguage.DefaultInput Language.Culture.EnglishName);
comboBox1.SelectedItem =
InputLanguage.DefaultInputLanguage.Culture.English Name;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
InputLanguage.CurrentInputLanguage =
lang[comboBox1.SelectedIndex];
richTextBox1.Focus();
}
So with the above code I could change the language and the change can be
seen when I type.. But however the existing text in the rich text box doesn't
change.. I would the existing text also to change when I change the
language..
For example
when the Input Language Is selected as English(United States) when I press
the keys 1,2,3,4,5,6
I get in the textbox as 123456
when the input language Is selected as French (France) when I press the keys
1,2,3,4,5,6
I get in the textbox as &é"'(-
Now what I require is without manually entering the text everytime. the text
should change according to the language selected..
ie..
123456 should automatically change to &é"'(-
Can anyone help me please.
Thanks In Advance 5 6526
"Rajkiran R.B." wrote:
Well I have multiple keyboard layouts installed in my system..
I have written a program in C# such that the required input language can be
selected using the following piece of code
InputLanguage[] lang = new
InputLanguage[InputLanguage.InstalledInputLanguages.Count];
private void Form1_Load(object sender, EventArgs e)
{
richTextBox1.LanguageOption =
RichTextBoxLanguageOptions.AutoKeyboard;
InputLanguage.InstalledInputLanguages.CopyTo(lang, 0);
foreach (InputLanguage l in lang)
{
comboBox1.Items.Add(l.Culture.EnglishName);
}
comboBox1.SelectedIndex =
comboBox1.Items.IndexOf(InputLanguage.DefaultInput Language.Culture.EnglishName);
comboBox1.SelectedItem =
InputLanguage.DefaultInputLanguage.Culture.English Name;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
InputLanguage.CurrentInputLanguage =
lang[comboBox1.SelectedIndex];
richTextBox1.Focus();
}
So with the above code I could change the language and the change can be
seen when I type.. But however the existing text in the rich text box doesn't
change.. I would the existing text also to change when I change the
language..
For example
when the Input Language Is selected as English(United States) when I press
the keys 1,2,3,4,5,6
I get in the textbox as 123456
when the input language Is selected as French (France) when I press the keys
1,2,3,4,5,6
I get in the textbox as &é"'(-
Now what I require is without manually entering the text everytime. the text
should change according to the language selected..
ie..
123456 should automatically change to &é"'(-
Can anyone help me please.
Thanks In Advance
You would need to convert your current string to the keys that generated it
in the old language, then convert those keys to the string it would create in
the new language.
That said, I don't know how you would get back the keys pressed without
saving them. How do you know 1, 2, 3 was pressed, versus pasting into the UI?
>
can u please say me how to convert it if I have the keys pressed.. assume
that there will be no txt pasted and all tet will be entered only by keying
it manually
"Family Tree Mike" <Fa************@discussions.microsoft.comwrote in
message news:CD**********************************@microsof t.com...
You would need to convert your current string to the keys that generated
it
in the old language, then convert those keys to the string it would create
in
the new language.
That said, I don't know how you would get back the keys pressed without
saving them. How do you know 1, 2, 3 was pressed, versus pasting into the
UI?
And can anyone say me how record keystrokes..
I had this idea..
Create a queue and in the keypress event of the richtextbox I could write
something like this..
queueobject.Enqueue(e.keyChar);
Will it work....
"Rajkiran R.B." wrote:
And can anyone say me how record keystrokes..
I had this idea..
Create a queue and in the keypress event of the richtextbox I could write
something like this..
queueobject.Enqueue(e.keyChar);
Will it work....
This seems like a lot of work to just make sure the text agrees with the
keyboard language. I hope that I'm not leading you astray.
To get and store the keys you will need to override the OnKeyPress method in
your form. There you can get the keydata from the keyeventargs object and
keep it in a list<keys>.
To send it back to the control upons language change, you may want to use
SendKeys().
I'm sure there are alternatives.
>
And can anyone say me how record keystrokes..
I had this idea..
Create a queue and in the keypress event of the richtextbox I could write
something like this..
queueobject.Enqueue(e.keyChar);
Will it work....
can u please say me how to convert it if I have the keys pressed.. assume
that there will be no txt pasted and all tet will be entered only by keying
it manually
You would need to convert your current string to the keys that generated
it
in the old language, then convert those keys to the string it would create
in
the new language.
That said, I don't know how you would get back the keys pressed without
saving them. How do you know 1, 2, 3 was pressed, versus pasting into the
UI?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Cooly Martziano |
last post by:
Hi Guyz,
Do you know how may I change the input language (of windows, assuming I have
the desired input language configured right in the regional settings)
programatically ?
Thanks,
Cooly M.
|
by: Bryan Berns |
last post by:
Just wondering whether anyone has an idea as how to set the default keyboard layout for the system in realtime. The following code I have does it for all ACTIVE processes. (New ones still use the...
|
by: Freddy |
last post by:
In my Access db (which I have created to help me learn Greek) I am using
text box controls on a form. Some of these controls require English input
and some require Greek input.
Currently I have...
|
by: silver |
last post by:
Hi...I have text input fields in one form of two different languages...is there a way to toggle the keyboard language for each input field?
Thanks ....
|
by: SapAddonDeveloper |
last post by:
Hello,
I am writing an add-on using vbnet/c# that runs inside
a Sap B1 application.
I need to be able to change the input language (little blue white icon on the system tray) on certain...
|
by: DigitalInvertor |
last post by:
Hi to all...
Is there a way of adding input language with Visual Basic 2005.
Yes, I could use:
Call Shell("rundll32.exe shell32.dll,Control_RunDLL intl.cpl", vbNormalFocus, True),
but I want to...
|
by: =?Utf-8?B?UHJvcXJhbW1lcg==?= |
last post by:
Hey
I'm looking for a way to find out what language the user is having as
his/her input language.
Thanks
|
by: Rajkiran R.B. |
last post by:
Well I have multiple keyboard layouts installed in my system..
I have written a program in C# such that the required input language can be
selected using the following piece of code
...
|
by: =?Utf-8?B?QW15?= |
last post by:
I'm currently using Microsoft Office 2007 which includes Access. I have set
up a secondary language in my computer since this is required, however I have
set the default input language as English...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |