Type Property Example

This example shows how the Type property can be used with the Session object and the Area object.

Sub Main()

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


 Set Sys = CreateObject("EXTRA.System")

' Assumes an open session

 Set Sess = Sys.ActiveSession


 'Using Type with Session object

 Select Case Sess.Type

 Case 1

  MsgBox "This is a 3270 session."

 Case 2

  MsgBox "This is a 5250 session."

 Case 3

  MsgBox "This is a VT session."

 End Select


 'Using Type with Area object

 Set MyScreen = Sess.Screen

 Set MyArea = MyScreen.Area(5, 5, 10, 10, , 3)

 Select Case MyArea.Type

 Case 0

  MsgBox "The Area type is xNONE."

 Case 1

  MsgBox "The Area type is xPOINT."

 Case 2

  MsgBox "The Area type is xSTREAM."

 Case 3

  MsgBox "The Area type is xBLOCK."

 End Select

End Sub