Reflection Desktop VBA Guide
Attachmate.Reflection.Objects Library / Attachmate.Reflection.Objects.Productivity Library / ScreenHistory Object / ShowScreen Method
The zero-based index of the screen to make active.
Example
ShowScreen Method
Shows a specific screen from the Screen History list.
Syntax
expression.ShowScreen( _
   ByVal index As Integer _
) 
where expression is a variable that represents a ScreenHistory Object

Parameters

index
The zero-based index of the screen to make active.
Exceptions
ExceptionDescription
Thrown if index is negative or exceeds the range of available screens.
Example
This example opens a screen history file and shows the last screen in the screen history.
Sub OpenScreenHistoryAndShowLastScreen()
    Dim rcode As ReturnCode
    Dim lastScreen As Integer
    
    Dim path As String
    path = Environ("USERPROFILE") & "\Documents\Micro Focus\Reflection\test.rshx"
    
    Dim history As ScreenHistory
    Set history = ThisIbmTerminal.Productivity.ScreenHistory
 
    'Clear the screen history and wait for the screens to clear
    history.ClearAllScreens
    ThisIbmScreen.Wait (2000)
    
    'Open the screen history panel
    history.ScreenHistoryPanelVisible = True
    
    'Open a screen history file
    history.OpenScreenHistoryFile path, True
        
    'Show the last screen in the list
    lastScreen = history.Index
    history.ShowScreen lastScreen
    
End Sub
See Also