User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive

Have you stared at your GUI and thought to yourself, I want it painted black?

I have good news! No colors anymore! Now you can paint it black (and white), with new themes for your PowerShell GUIs.

This feature is included with PowerShell Studio v5.6.164 or greater.


New Form Template

If you creating a new form, you can select the new Dark and Light Themed Form template:

Dark and Light Theme Form Template

The new template comes with a MenuStrip that contains a theme dropdown:

Theme MenuStrip

Paint it Black

Select the Dark theme option, and it will paint your form black:

Dark Themed Form

Paint it White

Select the Light theme option, and it will paint your form white:

Light Themed Form

Note: The designer will not reflect the themed colors. The themes are applied at runtime when the Set-ControlTheme function is invoked (see below).

New Control Set

Have an existing form? You can use the new Form – Dark and Light Theme control set to add a theme menu strip to your existing form:

Dark and Light Theme Control Set

New Snippet

If you just want to use the underlying function, select the Set-ControlTheme snippet.

Set ControlTheme snippet

This snippet contains the Set-ControlTheme function.

The Set-ControlTheme Function

All the magic happens within the Set-ControlTheme function. The function has three parameters:



The Control parameter accepts a GUI control, typically the form itself. The function will then apply the theme to the control, and any child controls contained within.


The Theme parameter determines the theme to apply to the specified control. The two theme choices are:



The CustomColor parameter allows you to specify a HashTable that contains user-defined colors for the theme. This parameter overrides the selected theme's default coloring.

Keys to override theme colors (optional):

Overrides the background color for the ListBox, TreeView, and grids controls.

Overrides the background color for panels and other container controls such as the form.

Overrides the background color for the controls.

Overrides the text color for the controls.


Overrides the border color for buttons, menus, and grid controls.


Overrides the selection foreground color for the DataGrid and DataGridView.


Overrides the selection background color for the DataGrid and DataGridView.


Overrides the color of menu items when a user selects or hovers over them.


#Override the Dark theme's Border and Selection colors
$hash = @{
    BorderColor = 'DodgerBlue'
    SelectionBackColor = 'DimGray'

Set-ControlTheme $form1 -Theme Dark -CustomColor $hash

Results in the following theme:

Customized Theme


There are some limitations to the themes.


Scrollbars are not skinned. The scrollbars are rendered by the OS and utilize the system's theme.

MonthCalendar Control

The calendar control's colors cannot be overwritten, so the control will retain its light color.

ProgressBar Control

Like the scroll bar, the ProgressBar's rendering is handled by the OS.

If you have questions about our products, please post in our support forum.
For licensed customers, use the forum associated with your product in our Product Support Forums for Registered Customers.
For users of trial versions, please post in our Former and Future Customers - Questions forum.
Copyright © 2024 SAPIEN Technologies, Inc.