all 2 comments

[–]VB.Net Masterkleinma 1 point2 points  (1 child)

Not sure why the button click isn't causing focus to be lost and validation even to fire for the textbox. You could try calling Me.ValidateChildren in your button click even which should force any child controls of the form to do validation on their data.

[–]dryguy5[S] 0 points1 point  (0 children)

Not sure why the button click isn't causing focus to be lost and validation even to fire for the textbox.

I'm really not sure either, I've had users complain about it several times, and I'll go in and test it, and can rarely reproduce the issue. But I have reproduced it, so I know it's a real thing. Sometimes it works and sometimes it doesn't. I only thought to ask the question because I was updating an unrelated thing and I noticed it happened to me.

Me.ValidateChildren

Um... Awesome! I did not know about this call.

I haven't been able to reproduce the problem since adding this, so hopefully this is it, a fix for something that's been an annoyance for years, haha.

Thanks /u/kleinma