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

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -