If I move the Main Window the others will stay locked with it. Now uncomment the "flag" line and run it again.
Now when I move the Main Window the others slowly wander off the screen. ?!?!?
(I only see this behavior when "DPI Aware" is on and the #PB_Window_SizeGadget flag is used)
Code: Select all
#Main=0
Global Dim w(3),x,y
Procedure Move()
fixx=WindowX(#Main)-x
fixy=WindowY(#Main)-y
x=WindowX(#Main)
y=WindowY(#Main)
For tmp=0 To 3
ResizeWindow(w(tmp),WindowX(w(tmp))+fixx,WindowY(w(tmp))+fixy,#PB_Ignore,#PB_Ignore)
Next
EndProcedure
;flag=#PB_Window_SizeGadget ;<------- test this line
If OpenWindow(#Main,0,0,900,300,"Main",#PB_Window_SystemMenu)
For tmp=0 To 3
w(tmp)=OpenWindow(#PB_Any,10+pos,50,200,150,"Win"+Str(tmp),flag,WindowID(Main))
pos+210
Next
BindEvent(#PB_Event_MoveWindow,@Move(),#Main)
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf