Here I have the same MessageBox function realized in Winforms and WPF. They show up as expected if I simply call them, but if I call them after a Get-Credential prompt as in this example they are hidden behind the ISE window. I'm running PS 5.0 on Windows 10. On Windows 7 and PS ISE 5.0 the Winforms version shows up topmost but WPF does not. I tried adding $Form.Focus() or $Window.Focus() with no effect. How can I ensure that the user gets error messages?