Sets the background color in the progress bar.


This method is only effective in the Windows Classic theme.

Raises syntax errors when incorrect arguments are detected.


The required argument is:


A COLORREF that specifies the new background color for the progress bar, or CLR_DEFAULT to set the backgroun color back to its default color. If needed, use the colorRef() method of the Image class to construct the proper value for this argument.

Return value:

This method returns the previous background color, or CLR_DEFAULT if the progress bar was using the default color.


This example sets the background color to a custom color. This will only have effect in Windows Classic theme. It is not neccessary to set numeric digits to 11 to use this method. In the example this is only done to allow the return to be displayed in hexadecimal.

  numeric digits 11

  progressBar = self~getProgressBar("IDC_PB_CONNECTING")

  say 'Going to set the background color for the progress bar'
  ret = progressBar~backgroundColor(.Image~colorRef(55, 111, 18))
  say 'Old background color was:' ret '(0x'ret~d2x')'

/* Output might be:

Going to set the background color for the progress bar
Old background color was: 4278190080 (0xFF000000)