1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-04 04:50:22 +00:00
QB64-PE/internal/help/_BACKGROUNDCOLOR__111111111111111.txt
Roland Heyder aeb9c0668b Updates help files for use with new Wiki parser (2nd try)
Note: Many files were removed (not yet existing/empty pages). The parser will try to download them on demand and will auto-generate text for missing pages (eg. most _gl pages).
2022-05-21 00:18:31 +02:00

52 lines
1.2 KiB
Plaintext

{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:06:37}}
{{DISPLAYTITLE:_BACKGROUNDCOLOR}}
The [[_BACKGROUNDCOLOR]] function returns the current background color.
{{PageSyntax}}
:{{Parameter|BGcolor&}} = [[_BACKGROUNDCOLOR]]
{{PageDescription}}
* Use it to get the current background color to restore later in a program.
* Returns the closest attribute value of the background color.
{{PageExamples}}
''Example 1:'' Storing a background color for later use.
{{CodeStart}}
{{Cl|SCREEN}} 0
{{Cl|COLOR}} 1, 3
{{Cl|CLS}}
BG% = {{Cl|_BACKGROUNDCOLOR}}
{{Cl|PRINT}} BG%
{{CodeEnd}}
{{OutputStartBG3}}{{Text|3|#0000aa}}
{{OutputEnd}}
''Example 2:'' Understanding the function output
{{CodeStart}}
{{Cl|SCREEN}} 0
{{Cl|COLOR}} 1, 11
{{Cl|CLS}}
BG% = {{Cl|_BACKGROUNDCOLOR}}
{{Cl|PRINT}} BG% 'prints the attribute as 3 instead of 11
{{CodeEnd}}
{{OutputStartBG3}}{{Text|3|#0000aa}}
{{OutputEnd}}
:''Explanation: SCREEN 0 background colors over 7 will return the lower intensity color attribute values: EX: attribute - 8
{{PageSeeAlso}}
* [[_DEFAULTCOLOR]]
* [[COLOR]], [[SCREEN]]
* [[SCREEN (function)]]
* [[Windows_Libraries#Color_Dialog_Box|Color Dialog Box]]
{{PageNavigation}}