Im trying to write Urdu in richtextbox in C#.i tried this by mapping each keyboard character to urdu letter(unicode). but the problem im facing is that : itz printing both charcters i.e. the pressed key(eng) & the corresponding urdu character.i did al that procedure on key Down event.
one of the solutions that i found was to set the system locale at runtime to either Urdu or Arabic.but it isn't wrking.
plz can anyone help me to do this...
regards
AArif.
Loading
abdul azeezPosted Nov 7, 2006, 12:33 AM
i know its too late but for the sake of information sharing i'm replying...
try this piece of code in the KeyPress event of the richtextbox...
const char ALIF = '\u0627';
const char BAY = '\u0628';
if(e.KeyChar == 'a')
{
e.Handled = true;
SendKeys.Send(ALIF.ToString());
}
else if(e.KeyChar == 'b')
{
e.Handled = true;
SendKeys.Send(BAY.ToString());
}