InfoConnect VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / GetCharacterAttributes Method
The screen row position.
The screen column position.
Example
In This Topic
    GetCharacterAttributes Method
    In This Topic
    Retrieves character attributes for the specified position on the screen.
    Syntax
    expression.GetCharacterAttributes( _
       ByVal row As Integer, _
       ByVal column As Integer _
    ) As CharacterAttributes
    where expression is a variable that represents a Screen Object

    Parameters

    row
    The screen row position.
    column
    The screen column position.

    Return Value

    The CharacterAttributes value that has attribute information for the specified position. May specify multiple attributes.
    Example
    This example checks the attributes of each character on a screen
    Sub CheckCharacterAttributes()
        Dim charAttr As CharacterAttributes
        Dim row, minRow, maxRow As Integer
        Dim column, minColumn, maxColumn As Integer
        Dim thisAttribute As Integer
         
        'Set the boundaries for rows and columns
        With ThisScreen
            minRow = .ScreenTopRow
            maxRow = .DisplayRows - 1
            minColumn = 1
            maxColumn = .DisplayColumns - 1
        End With
        
        'check character attributes for each screen position
        For row = minRow To maxRow - 1
            For column = minColumn To maxColumn
              'Get the character at this screen position
              charAttr = ThisScreen.GetCharacterAttributes(row, column)
              
              If charAttr = CharacterAttributes_NoCharacter Then
                  Debug.Print "not a character"
              Else
        
                  'Check the attributes for each character.
                  If charAttr = CharacterAttributes_Blink Then
                      Debug.Print "Blinking starts at row " & row & "and column " & column
                  End If
                  
                  If charAttr = CharacterAttributes_Bold Then
                      Debug.Print "Bold starts at row " & row & "and column " & column
                  End If
                  
                  If charAttr = CharacterAttributes_Plain Then
                      Debug.Print "No attributes are set"
                  End If
                  
                  If charAttr = CharacterAttributes_Reverse Then
                      Debug.Print "Reverse video starts at row " & row & "and column " & column
                  End If
                  
                  If charAttr = CharacterAttributes_Underline Then
                      Debug.Print "Underline starts at row " & row & "and column " & column
                  End If
              
              End If
            
            Next
            
        Next
    End Sub
    See Also