Dialog Placement

I just filed a feature request (maybe should be considered a bug?) <https://xojo.com/issue/48145>

In the mean time is there a way to get dialogs to open on the same screen as the parent app? Maybe a windows setting?

You can get a dialog to display on whatever screen you want by setting its Top and Left properties.

For example, this code will center a dialog over its parent window, regardless of what screen it is on:

Dim dlg As New Window2

Dim dLeft As Integer = Self.Left + (Self.Width - dlg.Width) / 2
Dim dTop As Integer = Self.Top + (Self.Height - dlg.Height) / 2

dlg.Left = dLeft
dlg.Top = dTop

dlg.ShowModal

With usage of the Screen method you can find out what screen a window is on and do the math to center the dialog differently if you want. There is some more info (and code) in these threads:

https://forum.xojo.com/38592-windows-opening-on-wrong-monitor/3
https://forum.xojo.com/7405-window-placement-clarification-needed/p1#p51863