I am working on a textbox. I used a keydown event for handling pressed key. Now I need to do in my keydown event to interrupt the first char from 0. Suppose in my textbox I pressed 779. Now if I press 0 before 779, then I want to disable 0 that means e.handled=true. I could solved it if I will know length position of press key in that time. My code will like the following:
private void txtBianry_KeyDown(object sender, KeyEventArgs e)
{
if (pressed key is of first length and 0 from full of text)
e.Handled = true;
}
How can I solve this?
Thanks in advance.