home *** CD-ROM | disk | FTP | other *** search
- * WINDOWS.PRG A program to demonstrate windowing.
-
- SET BELL OFF
- SET SAFETY OFF
- CLEAR
-
- * Define window Choice.
- WSET WINDOW Choice TO 15,1,18,41 DOUBLE
- TEXT
- Welcome to windowing with dBXL.
-
- This demonstration illustrates several basic windowing commands.
- With them, you can make windows:
-
- A. Move
- B. Expand
- C. Contract
- D. Overlap
-
- Make a selection by letter. Press Q to quit.
- ENDTEXT
- STORE " " TO ans
- DO WHILE ans <> "Q"
-
- * Open window Choice in Area 1. Display message.
- WSELECT 1
- WUSE Choice
- @ 1,7 SAY "Your choice:" GET ans PICTURE "!"
- READ
- * Erase window contents.
- CLEAR
-
- DO CASE
- CASE ans = "A"
- * Move window to new coordinates.
- WMOVE TO 4,35
- WAIT
- CASE ans = "B"
- * Stretch window from top left to bottom
- * right of screen.
- WSET SIZE TO 1,1,23,78
- WAIT
- CASE ans = "C"
- * Shrink window.
- WSET SIZE TO 15,1,16,30
- WAIT
- CASE ans = "D"
- * Save Choice to a screen file and then
- * restore it in three different areas.
- * Move each window to new coordinates.
- WSAVE TO Archive
- WSELECT 2
- WRESTORE FROM Archive
- WMOVE TO 1,1
- WSELECT 3
- WRESTORE FROM Archive
- WMOVE TO 4,4
- WSELECT 4
- WRESTORE FROM Archive
- WMOVE TO 7,7
- WAIT
- ENDCASE
-
- * Remove all windows.
- WCLOSE ALL
-
- ENDDO
-