[Windows] - synchronize windows position
Posted: Wed May 20, 2020 7:07 am
Hi,
I'd like to snap one window to another, which works fine using callbacks in principle, but depending on the windows flags the second window gets misplaced by some pixels...
...the following code will display window #2 perfectly aligned but windows #3 should be set some pixels up and to the right.
How to get them all arranged in one line?
I'd like to snap one window to another, which works fine using callbacks in principle, but depending on the windows flags the second window gets misplaced by some pixels...
...the following code will display window #2 perfectly aligned but windows #3 should be set some pixels up and to the right.
How to get them all arranged in one line?
Code: Select all
OpenWindow(0,20,20,200,200,"1",#PB_Window_SystemMenu)
OpenWindow(1,20,20,200,200,"2",#PB_Window_SystemMenu)
OpenWindow(2,20,20,200,200,"3",#PB_Window_SystemMenu|#PB_Window_SizeGadget)
ResizeWindow(1,WindowX(0)+WindowWidth(0,#PB_Window_FrameCoordinate)+GetSystemMetrics_(#SM_CXSIZEFRAME),WindowY(0),#PB_Ignore,#PB_Ignore)
ResizeWindow(2,WindowX(1)+WindowWidth(1,#PB_Window_FrameCoordinate)+GetSystemMetrics_(#SM_CXSIZEFRAME),WindowY(1),#PB_Ignore,#PB_Ignore)
Delay(3456)