2016-03-18 11:36:04 +00:00
|
|
|
{{DISPLAYTITLE:_BACKGROUNDCOLOR}}
|
2017-10-10 14:55:21 +00:00
|
|
|
The [[_BACKGROUNDCOLOR]] function returns the current background color.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageSyntax}}
|
2017-10-10 14:55:21 +00:00
|
|
|
:{{Parameter|BGcolor&}} = [[_BACKGROUNDCOLOR]]
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{PageDescription}}
|
|
|
|
* Use it to get the current background color to restore later in a program.
|
2017-10-10 14:55:21 +00:00
|
|
|
* Returns the closest attribute value of the background color.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
2017-10-10 14:55:21 +00:00
|
|
|
{{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}}
|
|
|
|
{{BlueStart}}3
|
|
|
|
{{BlueEnd}}
|
|
|
|
|
|
|
|
|
|
|
|
''Example 2:'' Understanding the function output
|
2015-08-02 12:12:44 +00:00
|
|
|
{{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}}
|
|
|
|
{{BlueStart}}3
|
|
|
|
{{BlueEnd}}
|
|
|
|
:''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]]
|
|
|
|
|
|
|
|
|
2019-04-15 01:15:33 +00:00
|
|
|
{{PageNavigation}}
|