winforms - PowerShell Form: Sometimes starts in the background -
i wrote little gui script use on daily basis. window starts in background behind other windows have opened. in case there no icon in task bar. phenomenon looks script not started. when minimize other windows can see script gui , after clicking icon on task bar appears.
here how defined powershell form:
[void] [system.reflection.assembly]::loadwithpartialname("system.windows.forms") [void] [system.reflection.assembly]::loadwithpartialname("system.drawing") $window = new-object system.windows.forms.form $window.startposition = "centerscreen" $window.autosize = $false $window.minimizebox = $false $window.maximizebox = $false $window.formborderstyle = "fixedtoolwindow" [...] $window.showdialog() | out-null
does know can ensure gui started on top?
Comments
Post a Comment