Click to See Complete Forum and Search --> : RE-Setting focus to a texbox


gfr1
November 9th, 2005, 11:18 AM
I have a C++ .NET forms application in which I input data into a textbox. When the tab key is used I check to see if the information entered is correct if not I want to set the focus back to the textbox I just left. Any suggestions on how to do this?

NoHero
November 9th, 2005, 12:58 PM
You could handle the Validating (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassvalidatingtopic.asp) event of the text box. This is might be what you need...