Force the "Modern Visual Style" on your GUI
https://www.systanddeploy.com/2014/07/powershell-force-modern-visual-style.html?m=1
If you have created a Powershell script using Windows Form, with PrimalForm for an example, this form may not appear as expected depending on where you launched this script.
Indeed your Form could appear with an old interface, as below :
To resolve this issue and force your form to be displayed correctly you have to add the line below to your script :
[System.Windows.Forms.Application]::EnableVisualStyles()
Now, your Form should appear as below :
Enregistrer un commentaire