简体   繁体   中英

How to not display key in textbox

I'd like to know how to solve my little problem. Im making calc with C# and have problem there:

if (e.KeyCode == Keys.Add)
        {
            textBox1.Clear();
            IfNumbersExist();
            SelectedOperation = Operation.Add;
            IsSecondNumberBeingEntered = true;
        }

So the problem is that when I'm pressing Add key textBox data is clearing, but '+' is still there. How to clear whole textBox to not display '+' too ?

Thanks

在黑暗中拍摄一些东西,但尝试将其添加到if语句中的某个位置:

e.Handled = true;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM