Skip to main content
OCLC Support

SetTopWindow

Find the syntax, use, parameters, return values, and an example for the SetTopWindow macro command in Connexion client.
Syntax BOOL = CS.SetTopWindow (nWindowId)
Use to Make the window specified by its numeric identification the current (topmost) window.
Parameters For nWindowId, enter the window number you want to make the current window, with 0 (zero) representing the first window.
Return values TRUE if the action is successful, or FALSE if not.
Example Sub Main()

     Dim CS As Object
     Dim sTitle As String

     Set CS = GetObject(,“Connex.Client”)

     If CS.IsOnline = False Then
          CS.Logon ““, ““, ““
     End If

     CS.OpenWorkform “bks”

     CS.Search “WC”, “#1”

     CS.Search “WC”, “gon,wi,th,w”

     CS.GetWindowTitle -1, sTitle

     MsgBox sTitle

     CS.SetTopWindow 0

     CS.GetWindowTitle -1, sTitle

     MsgBox sTitle
End Sub
What this example does
  • Logs on to Connexion if not already logged on, using the default authorization and password you selected in Tools > Options > Authorizations tab.
  • Opens a workform with the Books format.
  • Searches WorldCat for record number 1 (opens a record).
  • Searches WorldCat for Gone with the Wind (opens a group list).
  • Returns the title of the currently active window: in this case WorldCat Group List, returned from the derived title search for Gone with the Wind.
  • Changes the top window to the first window opened (in this case a workform with the Books format).
  • Returns the title of the new top window, Bibliographic Workform: Books.