HTBasic Help
×
Menu
Index

Window Control Codes

 
The HTBasic application windows attributes can be controlled (set or read) using GESCAPE CRT codes including size, position, hide, restore, maximize, minimize, bring to top, hide/restore title bar, DUMP screen area size(%), and more depending on window type as detailed below.
 
GESCAPE CRT, code [,set(*)] [;get(*)]
 
The code values listed below show which operation they control for each window.
 

Run Output Window

Code    Operation                                                                  
30        Maximize the window
31        Hide the window
32        Restore the window
33        Set interior client of the app window position and size
34        Get interior client of the app window position and size
35        Bring the window to the top
36        Get the screen size
37        Returns the Title Bar enable flag
38        Hide / restore title bar
39        Set the DUMP size (% of paper width)
41        Minimize the window
 

Editor Window

Code    Operation                                                                    
130        Maximize the window
131        Hide the window
132        Restore the window
135        Bring the window to the top
137        Returns the Title bar enable flag
138        Hide / Restore the Title bar (Toggle switch)
141        Minimize the window
152        Disable Borders
153        Enable Borders
 

Application Window

Code    Operation                                                                    
46        Turn the Control Toolbar Off
47        Turn the Control Toolbar On
48        Turn the Status Bar Off
49        Turn the Status Bar On
50        Remove Main Menu
51        Restore Main Menu
52        Disable Borders on Parent Window
53        Enable Borders on Parent Window
54        Disable Minimize button on Parent Window
55        Enable Minimize button on Parent Window
56        Disable Maximize button on the Parent Window
57        Enable Maximize button on the Parent Window
58        Disable Close button on the Parent Window
59        Enable Close button on the Parent Window
60        Turn the Bookmark Toolbar Off
61        Turn the Bookmark Toolbar On
62        Turn the Debug Toolbar Off
63        Turn the Debug Toolbar On
64        Filename in titlebar off
65        Filename in titlebar on
 
The following shows several examples of GESCAPE CRT. The set array variable contains data to send; and the get array variable receives data. Note that set has a comma before it while get has a semicolon.
 
INTEGER Get4(1:4),Set4(1:4),Get2(1:2),Set1(1:1)
DATA 90,100,500,300        ! Position of upper left corner: (90,100),
READ Set4(*)               ! Width = 500, Height = 300
 
GESCAPE CRT,30             ! Maximize the window
GESCAPE CRT,31             ! Hide the window
GESCAPE CRT,32             ! Restore the window
GESCAPE CRT,33,Set4(*)     ! Set position and size: X,Y,W,H
GESCAPE CRT,34;Get4(*)     ! Get position and size: X,Y,W,H
GESCAPE CRT,35             ! Bring the window to the top
GESCAPE CRT,36;Get2(*)     ! Get the screen size: W,H 
GESCAPE CRT,37;Get3(*)     ! Get the title bar enable flag 
PRINT Get(2)               ! Print the Screen Size
PRINT Get(3)               ! Print the title bar enable flag
Set1(1)=50                 ! Set the DUMP size to 50%
GESCAPE CRT,38             ! Hide window Title Bar
GESCAPE CRT,38             ! Restore window Title Bar
GESCAPE CRT,39,Set1(*)     ! Set the DUMP size (default is 100%)
GESCAPE CRT,41             ! Minimize the window
GESCAPE CRT,32             ! Restore the window
END