InfoConnect VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / ScreenTopRow Property
Example
In This Topic
ScreenTopRow Property
In This Topic
Gets the row number of the top row of the screen (in host-addressable coordinates).
Syntax
expression.ScreenTopRow As Integer
where expression is a variable that represents a Screen Object

Property Value

The ScreenTopRow value is always 1 unless InfoConnect is emulating an HP host terminal. For HP terminals, the value is equal to the number of rows of display memory above what the host would consider to be the top row on the screen. This can be different from the top row that is visible in the window if the user has scrolled using the scroll bar.
Example
This example checks the attributes for 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