how can I make a text box accept only Cyrillic(russian) alphabet letters? Please help

I'd personally use an array or something to store the values of the russian alphabet, and then if the user inputs anything other than those letters (checking via for loop) then prevent it by remplacing that character with an empty char or string.

private string[] RussianAlpha = new string[CharacterCountOfRussianAlphabet];

private void CheckText(string tbInputNewChar)
{
 for (int i = 0; i < RussianAlpha.Length; i++)
 {
  if (i == RusianAlpha.Length - 1)
    tbInputNewChar.Replace(tbInputNewChar, String.Empty);
 }

 TextBox.Text += tbInputNewChar;
}

Something of that nature. But that's just what I would attempt to do. Logic may be off a bit, and don't have a compiler to test it at the moment, but with a little modification it should work. You'll have to store the values of the Russian alphabet into the array at load time or in the Form1 or Console constructor.

Jamie

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.