' if the textbox is empty show an error message 1001
Private Sub TextBox1_Valida ting(ByVal sender As System.Object,
ByVal e As System.Componen tModel.CancelEv entArgs) Handles
TextBox1.Valida ting
TextBox1.BackCo lor = Color.White
If TextBox1.Text.L ength = 0 Then
TextBox1.Select ()
TextBox1.BackCo lor = Color.Yellow
MsgBox("1001")
e.Cancel = True
End If
End Sub
but if I click the DateTimePicker, the message "1001" will be
displayed twice, and then as long as I click the left mouse , it will
be showed twice.
Can anybody tell me how to deal with it ?
Thanks .
Comment