# PowerShell Always On Top

#### You:
give powershell command that shows popuip always on top

#### ChatGPT:
You can force a PowerShell popup to stay **always on top** by using a hidden WinForms window as the “owner” of the message box.

Here’s a working one-liner:

```powershell
Add-Type -AssemblyName System.Windows.Forms; $f = New-Object Windows.Forms.Form; $f.TopMost = $true; [System.Windows.Forms.MessageBox]::Show($f, "This is a popup", "Title")
```

### What this does

- Creates a temporary invisible Form
- Sets `TopMost = $true`
- Uses it as the owner of the MessageBox
- Forces the popup to stay above other windows

---

If you want a slightly more reusable version (cleaner):

```powershell
Add-Type -AssemblyName System.Windows.Forms
$form = New-Object Windows.Forms.Form
$form.TopMost = $true
[System.Windows.Forms.MessageBox]::Show($form, "Always-on-top popup", "Notice")
```

---

If you meant a **custom floating window (not just a MessageBox)**, tell me—I can give you a true always-on-top mini GUI instead.
