I have a textbox, and I want it so if the user clicks anywhere on the form that is not the textbox itself, such textbox will lose focus. Any ideas?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Set the ActiveControl property of the form to
nullto achieve what you want.Note that this is contrary to what all other programs does, so it’ll be a disconnect between the user expectations and the actual user experience. I would advice against it.