winform中计算器退格键怎么写

1.C#程序中的Button按钮实现键盘上的退格键和Delete的功能? private void Button_Click_1(object sender, RoutedEventArgs e){int index = tbx.SelectionStart;if (tbx.SelectionLength > 0){tbx.Text = tbx.Text.Remove(tbx.SelectionStart, tbx.SelectionLength);tbx.SelectionStart =index;}else if (tbx.SelectionStart < tbx.Text.Length){tbx.Text = tbx.Text.Remove(tbx.SelectionStart, 1);tbx.SelectionStart = index;}tbx.Focus();} 。
【winform中计算器退格键怎么写】

winform中计算器退格键怎么写

文章插图