Visible Property Example

Using the Visible property, this example indicates which QuickPads are visible and invisible, then indicates which sessions are visible and invisible.

Sub Main()

Dim Sys As Object, AllSess As Object, Sess As Object, QPads As Object

 

 Set Sys = CreateObject("EXTRA.System")

 Set AllSess = Sys.Sessions

' Assumes an open session

 Set Sess = Sys.ActiveSession

 Set QPads = Sess.QuickPads

 

 ' This example demonstrates the Visible property with QuickPad
 ' objects. This example works equally well for Toolbars by
 ' replacing the QuickPads object with a Toolbars object.

 For i = 1 To QPads.Count

  If QPads.Item(i).Visible Then

  VisQPads$ = VisQPads$ + QPads.Item(i).Name

  Else

  InvisQPads$ = InvisQPads$ + QPads.Item(i).Name

  End If

 Next

 MsgBox "The following QuickPads are visible: " + VisQPads$

 MsgBox "The following QuickPads are NOT visible: " + InvisQPads$

 

 ' Likewise, this example demonstrates the Visible property with
 ' Session objects.

 For i = 1 To AllSess.Count

  If AllSess.Item(i).Visible Then

  VisSess$ = VisSess$ + AllSess.Item(i).Name

  Else

  InvisSess$ = InvisSess$ + AllSess.Item(i).Name

  End If

 Next

 MsgBox "The following Sessions are visible: " + VisSess$

 MsgBox "The following Sessions are NOT visible: " + InvisSess$

End Sub