Is that the expected behaviour ?
PS: UHD monitor with "Enable DPI aware" CHECKED. But I don't think that's relevant.
Code: Select all
;
; ------------------------------------
; #PB_Ignore BUG ?
; Blue August 2025
; from PureBasic Window example file
; ------------------------------------
;
#winW = 320 : #winH = 260
#winX = 234 : #winY = 200
#gX = 10 : #gW = 310 : #gH = 20
If OpenWindow(0, #winX, #winY, #winW, #winH, "Window #0", #PB_Window_SystemMenu)
gY = 10
TextGadget(00,#gX,gY,#gW,#gH, "Reference window positionned at (" + WindowX(0) + "," + WindowY(0)+")")
gY + #gh + 2
TextGadget(01,#gX,gY,#gW,#gH, "as requested. Nothing wrong here.")
gY + #gh + 2
TextGadget(02,#gX,gY,#gW,#gH, "But look at the others...")
EndIf
If OpenWindow(1, #winX, #PB_Ignore, #winW, #winH, "Window #1", #PB_Window_SystemMenu)
gY = 10
TextGadget(10,#gX,gY,#gW,#gH, "Ah ah! This window ")
gY + #gh + 2
TextGadget(11,#gX,gY,#gW,#gH, "is NOT at the requested X position. (" + #winX +").")
gY + #gh + 2
TextGadget(12,#gX,gY,#gW,#gH, "It is at (" + WindowX(1) + "," + WindowY(1)+"),")
gY + #gh + 2
TextGadget(13,#gX,gY,#gW,#gH, "but it should be at (" + #winX + ","+ WindowX(1) +")")
EndIf
If OpenWindow(2, #PB_Ignore, #winY, #winW, #winH, "Window #2", #PB_Window_SystemMenu)
gY = 10
TextGadget(20,#gX,gY,#gW,#gH, "Ah ah! This window ")
gY + #gh + 2
TextGadget(21,#gX,gY,#gW,#gH, "is NOT at the requested Y position (" + #winY +").")
gY + #gh + 2
TextGadget(22,#gX,gY,#gW,#gH, "It is at (" + WindowX(2) + "," + WindowY(2)+"),")
gY + #gh + 2
TextGadget(23,#gX,gY,#gW,#gH, "but it should be at ("+WindowX(2) +","+ #winY +")")
Repeat
event = WaitWindowEvent()
If event = #PB_Event_CloseWindow
Break
EndIf
ForEver
EndIf
End