I have been able to work arround the Microsoft bug that exists in all Windows version, when trying to set the location of a common FileOpen/FileSave dialog on a second monitor in multiple display mode.
You can't imagine what i had to do to solve this "simple" problem ...
By the way i have also added a new GDImage function named "ZI_CenterDialog" to center the dialog to the display instead of the default GDImage's parent window.
If ever you have a multiple display and a slower PC than mine, you can adjust in the main WndProc the dlgSleep parameter to a longer delay (millisecond), see below:
' // This is to force a correct placement of the FileOpen/FileSave common dialog
' // when using multiple display mode and working on the second display.
STATIC dlgWnd, dlgX, dlgY AS LONG, dlgSleep AS DWORD
IF dlgWnd THEN
IF GetTickCount() > dlgSleep THEN
CALL SetWindowPos(dlgWnd, dlgWnd, dlgX, dlgY, 0, 0, %SWP_NOZORDER OR %SWP_NOSIZE)
dlgWnd = 0: dlgSleep = 0
SELECT CASE LONG Msg
dlgWnd = wParam: dlgX = LO(INTEGER, lParam): dlgY = HI(INTEGER, lParam)
dlgSleep = GetTickCount() + 10 ' 100