1

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.

Rory
  • 40,559
  • 52
  • 175
  • 261
  • 3
    [Is it legal to have a cross-process parent/child or owner/owned window relationship?](https://blogs.msdn.microsoft.com/oldnewthing/20130412-00/?p=4683) In short: It's legal, but won't work, unless both applications are prepared for this. MS Edge is not prepared to have a cross-process owner/owned window relationship. – IInspectable Dec 06 '16 at 13:00
  • 1
    Your design sounds frustrating to the user; they will likely uninstall your program. Why do you need to stop them from using another program? – andlabs Dec 06 '16 at 20:58
  • Sometimes the world is a frustrating place. Especially in the enterprise. – Rory Dec 06 '16 at 21:10

0 Answers0