Treat windows or at least window identities as first class objects.

 Store window identities in variables, compare them for equality.
 Provide examples of performing some of the following:
 hide, 
 show, 
 close, 
 minimize, 
 maximize, 
 move,     and 
 resize a window. 


The window of interest may or may not have been created by your program.




 
#lang racket/gui
 
(define (say . xs) (printf ">>> ~a\n" (apply ~a xs)) (flush-output))
 
(define frame (new frame% [label "Demo"] [width 400] [height 400]))
(say "frame = " frame) ; plain value
 
(say 'Show)     (send frame show #t)      (sleep 1)
(say 'Hide)     (send frame show #f)      (sleep 1)
(say 'Show)     (send frame show #t)      (sleep 1)
(say 'Minimize) (send frame iconize #t)   (sleep 1)
(say 'Restore)  (send frame iconize #f)   (sleep 1)
(say 'Maximize) (send frame maximize #t)  (sleep 1)
(say 'Restore)  (send frame maximize #f)  (sleep 1)
(say 'Move)     (send frame move 100 100) (sleep 1)
(say 'Resize)   (send frame resize 100 100) (sleep 1)
(say 'Close)    (send frame show #f) (sleep 1) ; that's how we close a window
 