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

Welcome Forums General PowerShell Q&A How can I make a PowerShell pop up come to the front (and be behind no windows)?

Viewing 2 reply threads
  • Author
    Posts
    • #60153
      Participant
      Topics: 4
      Replies: 0
      Points: 0
      Rank: Member

      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
      Participant
      Topics: 18
      Replies: 573
      Points: 32
      Rank: Member

      post your code.

    • #60226
      Participant
      Topics: 1
      Replies: 15
      Points: 0
      Rank: Member

      Have you tried setting the TopMost property to true?

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

Viewing 2 reply threads
  • The topic ‘How can I make a PowerShell pop up come to the front (and be behind no windows)?’ is closed to new replies.