Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void TextBox1_KeyPress(object sender, KeyPressEventArgs e)
- {
- e.Handled = (e.KeyChar == (char)Keys.Space);
- }
- private void Button5_Click(object sender, EventArgs e)
- {
- if (textBox1.Text == "" ^ textBox1.Text.Any(char.IsDigit))
- {
- MessageBox.Show("Введите имя!n1.Ваше имя не должно содержать цифр или любых других знаков!n2.Ваше имя не должно быть пустым!");
- }
- else
- {
- //другие условия
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement