如题,有没有函数是支持这个功能的,在做计算器的退格功能..

解决方案 »

  1.   

    点一下按键,触发事件,然后 TextBox.Text= TextBox.Text.Substring(0,TextBox.Text.Length-1)
      

  2.   

    两个方向一个是 send{Backspace}另一个是对 内容做字符串处理
      

  3.   

    SendKeys.send("{Backspace}");好像是这样具体查一查
      

  4.   

    protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
      {
        switch (keyData)
        {
          case Keys.Back:    // 退格
            text.Text =text.Text.Length>0? text.Text.Substring(0, text.Text.Length - 1):"";
            return true;
          DEFAULT:
            return true;
        }
        return base.ProcessCmdKey (ref msg, keyData);
      }
      

  5.   

    SendKeys.send("{Backspace}")和VB的一样
      

  6.   

    TextBox.Text= TextBox.Text.Substring(0,TextBox.Text.Length-1) 可以