WinForms dialog not popping up on top of Windows Terminal #9201

Closed
opened 2026-01-31 01:48:35 +00:00 by claunia · 2 comments
Owner

Originally created by @ghost on GitHub (Jun 22, 2020).

Environment

Windows build number: 10.0.19041.0
Windows Terminal version (if applicable):
1.1.1671.0 (Preview) and 1.0.1401.0 (Stable)
Any other software?
Windows PowerShell 5.1 and PowerShell 7.0.2

Steps to reproduce

  1. Run the following command in Windows PowerShell 5.1 or PowerShell 7.0.2
Add-Type -AssemblyName System.Windows.Forms
$d = New-Object System.Windows.Forms.FolderBrowserDialog
$d.ShowDialog()
  1. Close the dialog and run this command twice
$d.ShowDialog((New-Object System.Windows.Forms.Form -Property @{TopMost = $true }))

Expected behavior

  1. A folder browser dialog should pop up on top of Windows Terminal window (this is the behavior in conhost.exe)
  2. A folder browser dialog should pop up on top of Windows Terminal window (this is the behavior in conhost.exe)

Actual behavior

  1. The dialog pop up behind Windows Terminal window. On PowerShell 7 the dialog is big so I can see part of it behind Terminal. On Windows PowerShell 5.1 the dialog is small and completely hidden behind. System.Windows.Forms.OpenFileDialog is also affected
  2. The dialog pop up behind Windows Terminal window on first try, and only pop up on top of Windows Terminal window on second try
Originally created by @ghost on GitHub (Jun 22, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.19041.0 Windows Terminal version (if applicable): 1.1.1671.0 (Preview) and 1.0.1401.0 (Stable) Any other software? Windows PowerShell 5.1 and PowerShell 7.0.2 ``` # Steps to reproduce 1. Run the following command in Windows PowerShell 5.1 or PowerShell 7.0.2 ```powershell Add-Type -AssemblyName System.Windows.Forms $d = New-Object System.Windows.Forms.FolderBrowserDialog $d.ShowDialog() ``` 2. Close the dialog and run this command twice ```powershell $d.ShowDialog((New-Object System.Windows.Forms.Form -Property @{TopMost = $true })) ``` # Expected behavior 1. A folder browser dialog should pop up _on top of_ Windows Terminal window (this is the behavior in conhost.exe) 2. A folder browser dialog should pop up _on top of_ Windows Terminal window (this is the behavior in conhost.exe) # Actual behavior 1. The dialog pop up _behind_ Windows Terminal window. On PowerShell 7 the dialog is big so I can see part of it behind Terminal. On Windows PowerShell 5.1 the dialog is small and completely hidden behind. `System.Windows.Forms.OpenFileDialog` is also affected 2. The dialog pop up _behind_ Windows Terminal window on first try, and only pop up _on top of_ Windows Terminal window on second try
claunia added the Resolution-Duplicate label 2026-01-31 01:48:35 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 22, 2020):

I'm gonna guess that this is is actually #2988. That's the issue tracking most of the z-order problems the Terminal sometimes has.

/dup #2988

@zadjii-msft commented on GitHub (Jun 22, 2020): I'm gonna guess that this is is actually #2988. That's the issue tracking most of the z-order problems the Terminal sometimes has. /dup #2988
Author
Owner

@ghost commented on GitHub (Jun 22, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jun 22, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9201