I have 2 text boxes and button on a form (okay, so there's a lot more than that, but that's all that matters at the moment)
When the form is loaded, the first text box gets focus. If the user clicks or tabs to the second text box, I want to do something, so I put that into the LostFocus event. Works great.
Unfortunately, I don't want to perform the event if the user immediately clicks the button. So, in effect if the click event of the button causes the lost focus event of the text box, I want to ignore the lost focus event. I understand that the lost focus event comes first, but surely there's some way around this little problem.
Thanks
When the form is loaded, the first text box gets focus. If the user clicks or tabs to the second text box, I want to do something, so I put that into the LostFocus event. Works great.
Unfortunately, I don't want to perform the event if the user immediately clicks the button. So, in effect if the click event of the button causes the lost focus event of the text box, I want to ignore the lost focus event. I understand that the lost focus event comes first, but surely there's some way around this little problem.
Thanks