Quote:C# private void btnBackspace_Click(object sender, EventArgs e) { //backspace if (txtResult.Text != string.Empty) { int txtlength=txtResult.Text.Length; if (txtlength != 1) { txtResult.Text = txtResult.Text.Remove(txtlength - 1); } else { txtResult.Text = 0.ToString(); } } }
private void btnBackspace_Click(object sender, EventArgs e) { //backspace if (txtResult.Text != string.Empty) { int txtlength=txtResult.Text.Length; if (txtlength != 1) { txtResult.Text = txtResult.Text.Remove(txtlength - 1); } else { txtResult.Text = 0.ToString(); } } }
private void button1_Click(object sender, EventArgs e) { textBox1.Focus(); Application.DoEvents(); SendKeys.Send("{BACKSPACE}"); }
string s = "0"; if (TextBox1.Text.Length > 1) { s = TextBox1.Text; s = s.Substring(0, s.Length - 1); } TextBox1.Text = s;
private void button1_Click(object sender, EventArgs e) { //backspace string temp= textBox1.Text; if (temp.Length != 0) { textBox1.Text = temp.Substring(1); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)