using_20the_20entire_20desktop_20area
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
using_20the_20entire_20desktop_20area [2018/03/31 13:19] – external edit 127.0.0.1 | using_20the_20entire_20desktop_20area [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Using the entire desktop area===== | =====Using the entire desktop area===== | ||
- | //by Richard Russell, October 2006//\\ \\ Normally you will want your BBC BASIC program either to use the default window size (this is appropriate for simple programs outputting only textual information) or to fix the window to a specific size in pixels (this will generally make incorporating graphics much easier, and makes your program independent of display resolution). The latter can be achieved either by using the [[http:// | + | //by Richard Russell, October 2006//\\ \\ Normally you will want your BBC BASIC program either to use the default window size (this is appropriate for simple programs outputting only textual information) or to fix the window to a specific size in pixels (this will generally make incorporating graphics much easier, and makes your program independent of display resolution). The latter can be achieved either by using the [[http:// |
+ | |||
+ | <code bb4w> | ||
SW_MAXIMIZE = 3 | SW_MAXIMIZE = 3 | ||
SYS " | SYS " | ||
VDU 26 | VDU 26 | ||
- | The **VDU 26** causes BBC BASIC to reset its text and graphics viewports to the new window size. Unfortunately a maximised window isn't necessarily ideal because the borders are hidden. If you want your window to be as large as possible without losing any of the borders or title bar etc. then you can use the following code:\\ \\ | + | </ |
+ | |||
+ | The **VDU 26** causes BBC BASIC to reset its text and graphics viewports to the new window size. Unfortunately a maximised window isn't necessarily ideal because the borders are hidden. If you want your window to be as large as possible without losing any of the borders or title bar etc. then you can use the following code: | ||
+ | |||
+ | <code bb4w> | ||
PROCfitworkarea(x%, | PROCfitworkarea(x%, | ||
VDU 23, | VDU 23, | ||
Line 23: | Line 29: | ||
y% -= rc.b%-rc.t%-y% | y% -= rc.b%-rc.t%-y% | ||
ENDPROC | ENDPROC | ||
+ | </ | ||
+ | |||
Because **VDU 23,22...** assumes there isn't a menu bar (even if there is!) you should usually set the last parameter of **PROCfitworkarea** to zero, as shown. Set it to 1 only if you want to know the size of the client area // | Because **VDU 23,22...** assumes there isn't a menu bar (even if there is!) you should usually set the last parameter of **PROCfitworkarea** to zero, as shown. Set it to 1 only if you want to know the size of the client area // |
using_20the_20entire_20desktop_20area.1522502390.txt.gz · Last modified: 2024/01/05 00:16 (external edit)