I think you are referring to control Validation.
In the designer, set the CausesValidation to True, this will cause the control to raise validation events when focus is lost etc.
The code below is an example that will retain focus on a textbox until ANY valid date is entered.
Private Sub TextBox1_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox1.Validating
Dim thisText As TextBox = CType(sender, TextBox)
If Not IsDate(thisText.Text) Then
MsgBox("You must enter a valid date in the " + thisText.Name)
thisText.Focus()
End If
End Sub