# Function Reference

GUISetBkColor

Sets the background color of the GUI window.

GUISetBkColor ( background [, winhandle] )

Parameters

background | Background color of the dialog box.
winhandle | [optional] Windows handle as returned by GUICreate (default is the previously used window).

Return Value

Success: | Returns 1.
Failure: | Returns 0.

Remarks

Earlier versions of AutoIt (prior to v3.0.102) used the BGR format for defining color - newer versions use RGB by default but this can be changed using the ColorMode option.

Related

ColorMode (Option), GUICreate

Example

#include <GUIConstants.au3>
GUICreate ("My GUI") ; will create a dialog box that when displayed is centered
GUISetBkColor (0xE0FFFF) ; will change background color
GUISetState () ; will display an empty dialog box
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend