Äåêëàðèðóåì:
Private Declare Function IsCharUpper Lib "user32" Alias "IsCharUpperA" (ByVal cChar As Byte) As Long
Private Declare Function IsCharLower Lib "user32" Alias "IsCharLowerA" (ByVal cChar As Byte) As Long
Private Declare Function IsCharAlpha Lib "user32" Alias "IsCharAlphaA" (ByVal cChar As Byte) As Long
Private Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA" (ByVal cChar As Byte) As Long
Ïðèìåð èñïîëüçîâàíèÿ:
Private Sub Text1_KeyPress(KeyAscii As Integer)
MsgBox "Upper Case: " & IsCharUpper(KeyAscii) & " Lower Case: " & IsCharLower(KeyAscii) & " Alpha: " & IsCharAlpha(KeyAscii) & " Alpha or Numeric: " & IsCharAlphaNumeric(KeyAscii)
End Sub