> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XFrontPanelSetLightStates

> XFrontPanelSetLightStates

Sets the states of the front panel lights.

## Syntax

```cpp theme={null}
HRESULT XFrontPanelSetLightStates(  
         XFrontPanelLight lights  
)  
```

### Parameters

*lights*   \_In\_\
Type: [XFrontPanelLight](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md)

Value that specifies the new states of the front panel lights.

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an error code.

## Remarks

The front panel of the XBOX One X dev kit includes five lights that correspond to the five programmable buttons.

![Front panel display of the XBOX One X](https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/front_panel_display_small.png?fit=max\&auto=format\&n=-_0FrcE2bDxzGxv-\&q=85\&s=8c81bf256714cec6526e83a4cbac5538)

For the *lights* parameter, combine values from the [XFrontPanelLight](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md) enumeration by using the bitwise OR operator.

To get the current states of the front panel lights, use [XFrontPanelGetLightStates](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetlightstates.md).

For more information, see [XBOX One X: Using the front panel display (NDA topic)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/dev-kits/concepts/scorpio-frontpanel).

## Requirements

**Header:** xfrontpaneldisplay.h

**Library:** xfrontpaneldisplay.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[XFrontPanelDisplay](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)


## Related topics

- [XFrontPanelLight](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md)
- [XFrontPanelGetLightStates](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetlightstates.md)
- [XFrontPanelDisplay (API contents)](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)
- [XFrontPanelGetButtonStates](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetbuttonstates.md)
- [XFrontPanelButton](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/enums/xfrontpanelbutton.md)
