Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void txtBox_KeyPress(object sender, KeyPressEventArgs e)
- {
- e.Handled = (e.KeyChar == '0');
- }
- private void txtBox_TextChanged(object sender, KeyPressEventArgs e)
- {
- if (String.IsNullOrEmpty(textbox.Text) || txtmoney.Text == "0")
- {
- // Do Something
- }
- }
- txtBox.KeyPress += txtBox_KeyPress;
- txtBox.TextChanged += txtBox_TextChanged;
Add Comment
Please, Sign In to add comment