Show modal dialog from Win32 app over a UWP application

368 Views Asked by At

Is there a way for a process to show a modal dialog over a separate process's UWP app (MS Edge in particular) or block any user interaction with a UWP application while we show our dialog?

Background

We have an application that from time to time, depending on user actions, should request additional information from the user by showing a modal dialog above a DIFFERENT application, blocking user input while the user interacts with the modal dialog.

With usual Win32 applications we can just show a WinForms modal dialog and set its window owner to the original application and that works fine, e.g.

dialog.ShowDialog(GetTargetWindow());

However that doesn't work with UWP applications. We tried the same approach, using different hWnds related to the UWP application (like ApplicationFrameWindow, Windows.UI.Core.CoreWindow, ApplicationFrameInputSinkWindow windows) but none seem to work. It looks like that doesn't work because of AppContainer isolation.

It's worth mentioning that this is enterprise software and we have a system service running in the background that can run code any privileges level, so permissions shouldn't be a problem.

0

There are 0 best solutions below