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
Section titled “Examples”Add-Type -AssemblyName System.Windows.Forms[System.Windows.Forms.Application]::EnableVisualStyles()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.