This example sets the three possible window states for the active session.
Sub Main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject("EXTRA.System")
' Assumes an open session
Set Sess = Sys.ActiveSession
MsgBox "Press for Minimized state ..."
Sess.WindowState = 0
MsgBox "Press for Normal state ..."
Sess.WindowState = 1
MsgBox "Press for Maximized state ..."
Sess.WindowState = 2
End Sub