Copy Method Example

This example first copies the entire session screen to the Clipboard, then copies an area of the screen to the Clipboard.

Sub Main()

 Dim Sys As Object, Sess As Object, MyScreen As Object, MyArea As Object

 

 ' Invoke the clipboard viewer

 Shell("clipbrd.exe")

 

 Set Sys = CreateObject("EXTRA.System")

' Assumes an open session

 Set Sess = Sys.ActiveSession

 

 ' This example demonstrates the Copy method for Screen objects.

 Set MyScreen = Sess.Screen

 MyScreen.SelectAll

 MyScreen.Copy

 

 MsgBox "The screen was copied to the clipboard. Press to copy a smaller area ..."

 ' This example demonstrates the Copy method for Area objects.

 Set MyArea = MyScreen.Area(1,1,10,10 , ,)

 MyArea.Select

 MyArea.Copy

End Sub