Private Sub textDate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles textDate.KeyPress If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 90) _ And (Microsoft.VisualBasic.Asc(e.KeyChar) < 97) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 122) Then 'space accepted If (Microsoft.VisualBasic.Asc(e.KeyChar) <> 32) Then e.Handled = True End If End If If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) Then e.Handled = False End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)