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

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

        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (((int)(e.KeyChar)) == 8)
            {
                if (label1.Text != "")
                   label1.Text = label1.Text.Substring(0, label1.Text.Length - 1);
            }
            else
                label1.Text += e.KeyChar;
        }
    }
}
