# How can I make a PowerShell pop up come to the front (and be behind no windows)?

**URL:** <https://forums.powershell.org/t/how-can-i-make-a-powershell-pop-up-come-to-the-front-and-be-behind-no-windows/7710>\
**Category:** PowerShell Help\
**Created:** [December 13, 2016, 7:26pm UTC](https://forums.powershell.org/t/how-can-i-make-a-powershell-pop-up-come-to-the-front-and-be-behind-no-windows/7710 "2016-12-13T19:26:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [December 13, 2016, 7:26pm UTC](https://forums.powershell.org/t/how-can-i-make-a-powershell-pop-up-come-to-the-front-and-be-behind-no-windows/7710/1 "2016-12-13T19:26:04Z")

</div>

I am using System.Windows.Forms and New-Object to have a pop up GUI from my PowerShell script. The pop up often appears behind the PowerShell ISE window. It is hidden this way. Is there a trick to make it always come to the front? I was thinking of using SendKeys. But I want other users to use it. There is no telling where they might click. I might be able to do something with SendKeys. But I think someone else has encountered this problem before.

---

<div class="post-metadata">

**Author:** ![dan-potter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/dan-potter/32/138_2.png) [@dan-potter](https://forums.powershell.org/u/dan-potter)\
**Post date:** [December 15, 2016, 8:19am UTC](https://forums.powershell.org/t/how-can-i-make-a-powershell-pop-up-come-to-the-front-and-be-behind-no-windows/7710/2 "2016-12-15T08:19:11Z")

</div>

post your code.

---

<div class="post-metadata">

**Author:** ![magicmonte](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@magicmonte](https://forums.powershell.org/u/magicmonte)\
**Post date:** [December 15, 2016, 9:14am UTC](https://forums.powershell.org/t/how-can-i-make-a-powershell-pop-up-come-to-the-front-and-be-behind-no-windows/7710/3 "2016-12-15T09:14:06Z")

</div>

Have you tried setting the TopMost property to true?

[https://msdn.microsoft.com/en-us/library/system.windows.forms.form(v=vs.110).aspx](https://msdn.microsoft.com/en-us/library/system.windows.forms.form(v=vs.110).aspx)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:39pm UTC](https://forums.powershell.org/t/how-can-i-make-a-powershell-pop-up-come-to-the-front-and-be-behind-no-windows/7710/4 "2024-05-16T20:39:42Z")

</div>


