۲۳-اردیبهشت-۱۳۸۹, ۱۲:۳۳:۴۰
۲۳-اردیبهشت-۱۳۸۹, ۱۳:۳۰:۴۹
خب کد اسکیش رو چک کن کوچیک تر از 128 باشه.
۲۲-تير-۱۳۸۹, ۱۲:۵۰:۴۱
فقط حروف انگلیسی وارد شود
این کد در برابر Paste هم محفوظه
این کد در برابر Paste هم محفوظه
کد:
private void textBox1_TextChanged(object sender, EventArgs e)
{
for (int i = 0; i < textBox1.Text.Length; i++)
{
int charCode = char.ConvertToUtf32(textBox1.Text, i);
if (!(charCode >= 65 && charCode <= 90) && !(charCode >= 97 && charCode <= 122))
{
textBox1.Text = textBox1.Text.Remove(i--, 1);
textBox1.Select(textBox1.Text.Length, 0);
}
}
} [code]