|
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 Declare Function IsCharLower Lib "user32" Alias "IsCharLowerA" (ByVal cChar As Byte) As Long
Private Declare Function IsCharUpper Lib "user32" Alias "IsCharUpperA" (ByVal cChar As Byte) As Long
Private Sub Form_KeyPress(KeyAscii As Integer)
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim strSave As String
'Clear the form
Me.Cls
'Set the current Y-position to 0
Me.CurrentY = 0
'Get the character information
If IsCharAlpha(KeyAscii) Then strSave = "Alpha"
If IsCharAlphaNumeric(KeyAscii) Then strSave = " AlphaNumeric"
If IsCharLower(KeyAscii) Then strSave = strSave + " Lower"
If IsCharUpper(KeyAscii) Then strSave = strSave + " Upper"
'Print the information to the form
Me.Print "You pressed: " + Chr$(KeyAscii)
Me.Print "This is:" + strSave
End Sub
|
|