using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EX4
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
           
                if ((int)e.KeyChar == 8 && label1.Text.Length > 10)
                    label1.Text = label1.Text.Remove((int)label1.Text.Length - 1);
                else if ((int)e.KeyChar != 8)
                    label1.Text = label1.Text + e.KeyChar;
       

        }
    }
}
