Search code examples
formswinformspowershellformborderstyle

PowerShell window border without Icon


I would like to create a windows form which does not contain an icon in the upper left corner. The problem is that I dont want to use the borderstyle "FixedToolWindow". I need to use the borderstyle "Fixed3D" but there is an icon by default. The following does not help:

$window.Icon = $null

In this case he takes an default icon.

How can I completely get rid of the icon with the borderstyle "Fixed3D" ???


Solution

  • You can set the ShowIcon property to false.

    $f = New-Object System.Windows.Forms.Form
    $f.ShowIcon=$False
    $f.ShowDialog()