1

Many apps trigger modal dialog boxes that take focus away from the app and prevent most kinds of interaction with the parent window.

Wordpad with Modal Dialog

While in this state, is it possible to move the parent window to another screen without closing the dialog?

(Obviously in the above case you can click Cancel, but this isn't always possible, e.g. if it's performing a task and displaying a progress bar.)

I am free to drag around the modal dialog, and it is moveable with shortcuts like WinShiftLeft, but I can't do this with the parent.

On Windows 11 in the WinTab task switcher I am able to right-click the parent window and snap it to the left or right of the screen, or move it to a new Desktop, but I don't think I can move that Desktop to a new screen.

(Once I've Snapped the parent window, I don't think I am even able to Unsnap it again.)

3
  • This seems a little short to go down as an answer to your question but I'm afraid it's no you cannot do this.
    – Mastaxx
    Commented Jan 13, 2023 at 13:39
  • I believe this is because the dialog box is actually part of the parent process. There aren't any additional processes that can be found within task manager that separate the dialog box from its parent application, or at least that seems to be the case with microsoft applications like notepad.exe. You can read up more on dialog boxes here: learn.microsoft.com/en-us/windows/win32/dlgbox/dialog-boxes
    – Mastaxx
    Commented Jan 13, 2023 at 13:43
  • Thanks. Do you know that it's not possible, or is it just that you've also tried everything you can think of? I've at least found that moving/resizing the parent can be done by snapping, so it seems at least technically pheasible.
    – mwfearnley
    Commented Jan 13, 2023 at 15:09

1 Answer 1

1

You can't move the parent window because the modal dialog disabled it. You need to enable the window in order to move it around. Doing so will mean that the window will move separately from the dialog, so you would need to move two times.

You may use the free AutoHotkey.

The following example script will enable the window under the cursor when F12 is pressed:

^F12::
MouseGetPos,,, WindowUnderMouse
WinSet, Style, -0x8000000, ahk_id %WindowUnderMouse%
return

This script might fail for some applications, but should work for most.

After installing AutoHotKey, put the above text in a .ahk file and double-click it to test. You may stop the script by right-click on the green H icon in the traybar and choosing Exit. To have it run on login, place it in the Startup group at
C:\Users\USER-NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

Useful AutoHotkey documentation:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .