Guest User

Untitled

a guest
Jun 22nd, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. private void txtBox_KeyPress(object sender, KeyPressEventArgs e)
  2. {
  3. e.Handled = (e.KeyChar == '0');
  4. }
  5.  
  6. private void txtBox_TextChanged(object sender, KeyPressEventArgs e)
  7. {
  8. if (String.IsNullOrEmpty(textbox.Text) || txtmoney.Text == "0")
  9. {
  10. // Do Something
  11. }
  12. }
  13.  
  14. txtBox.KeyPress += txtBox_KeyPress;
  15. txtBox.TextChanged += txtBox_TextChanged;
Add Comment
Please, Sign In to add comment