( Unless I'm reading it wrong, it describes the problem exactly, but the solution doesn't work. Remember to set to false the Causes Validation = false of the exit button Also you can put it in the mouse down even or Closing Form Event, any event that triggers before the validating event. IT is so annoying working with MS buggy implementation.
I took what you all had here and made some adjustments.
NET ͌l IɍԂCɓ̊JłB Cause Validation vpe B̒l CɂĂ̂ł傤?
Of course, there was lots of more cool features involved but for the sake of this post I'll keep it simple.
NET controls is in the order in which they fire the Lost Focus and Validate events.
VB6 controls fire the Validate event first and then the Lost Focus event; if the Validate sets Cancel=True, then the Lost Focus event is never fired.
Back Color = vb Yellow End Sub Private Sub Text1_Lost Focus() Text1.
Back Color = vb White End Sub Private Sub Text1_Validate(Cancel as Boolean) Cancel = (Text1. In some applications, however, the code in the Text1_Lost Focus method might depend on some variable that has been set in the Validate event.