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

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Monte Hazboun Monte Hazboun 7 months, 1 week ago.

  • Author
  • #60153
    Profile photo of Kevin

    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.

  • #60220
    Profile photo of Dan Potter
    Dan Potter

    post your code.

  • #60226
    Profile photo of Monte Hazboun
    Monte Hazboun

    Have you tried setting the TopMost property to true?

You must be logged in to reply to this topic.