Enable Visual Styles¶
In a ScriptoForm, the EnableVisualStyles static .NET function enables visual styles for the application. Visual styles are the colors, fonts, and other visual elements that form an operating system theme. This function gives the controls used in a script a more modern and aesthetically pleasing appearance.
Examples¶
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()
Notes¶
The "EnableVisualStyles" function is defined in the "System.Windows.Forms" namespace and must be called after loading the assembly for it. To have an effect, this function must be called before instantiating any controls objects.
References¶
Application.EnableVisualStyles Method (System.Windows.Forms) | Microsoft Learn