BEGO LOGO

Search Source
Custom Search

  • Char Type -> IsCharAlphaNumeric

  • Code: Select all
    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)



    Dim strSave As String
    'Clear the form
    Me.Cls
    'Set the current Y-position to 0
    Me.CurrentY = 0
    'Get the character information
    If IsCharAlphaNumeric(KeyAscii) Then strSave = " AlphaNumeric"
    If IsCharAlpha(KeyAscii) Then strSave = "Alpha"
    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
    Code: Select all

    To Top

    Window Draw . Audio Input/Output level . Paths . Load Picture from URL . Properties . Low Level Audio Stream . Console Application II . Path Functions (2) . File Date . ArcTo . Crypto . CopyRect . FatalAppExit . Enumerate Processes . Device Gamma . EnumServicesStatus . Flat Scrollbar . Hooks . Printer DeviceCapabilities . DriveType .