if you have coded the form's keypress event (obviously the keypreview is true) does that override a textbox's keypress event (when textbox has focus) ? yea i'm not @ home right now... me.hasbeer = true
It doesn't override it but it does supersede it (the form's keypress event occurs first).
Both procedures will receive the same KeyPressEventArgs, so if you set the KeyPressEventArgs.Handled property to true in the form's keyPress event handler (e.Handled = True), the TextBox's keyPress event won't occur. Of course, the user won't be able to type anything in the textBox if the keyPress event doesn't occur.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.