Flat controls when built as exe

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 10 months and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
psIde_4_Carl
Posts: 1
Last visit: Thu May 18, 2023 3:51 pm

Flat controls when built as exe

Post by psIde_4_Carl »

Product: PowerShell Studio 2020 (64 Bit)
Build: v5.7.182
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19045.0

I have various scripts, all of which look fine when run either from a powershell console or via right-click 'Run with Powershell' if i specify the .ps1 file.
but if i create an EXE from the script (with or without an embedded manifest) from PS Studio, all of the controls lose there 3D look, ie. buttons look flat etc.

I have tried using void][System.Windows.Forms.Application]::EnableVisualStyles() to no avail.

Does anyone have any other suggestions besides using void][System.Windows.Forms.Application]::EnableVisualStyles() ??
thankyou
This topic is 10 months and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked