For example, in the following:
Code: Select all
If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
Debug "(open) WindowX(0)=" + WindowX(0) + ", WindowY(0)=" + WindowY(0) + ", WindowWidth(0)=" + WindowWidth(0) + ", WindowHeight(0)=" + WindowHeight(0)
Delay(2000)
SetWindowState(0, #PB_Window_Maximize)
Debug "(max) WindowX(0)=" + WindowX(0) + ", WindowY(0)=" + WindowY(0) + ", WindowWidth(0)=" + WindowWidth(0) + ", WindowHeight(0)=" + WindowHeight(0)
Delay(2000)
SetWindowState(0, #PB_Window_Normal)
Debug "(normal) WindowX(0)=" + WindowX(0) + ", WindowY(0)=" + WindowY(0) + ", WindowWidth(0)=" + WindowWidth(0) + ", WindowHeight(0)=" + WindowHeight(0)
EndIf
I get the following debug messages:
Code: Select all
(open) WindowX(0)=100, WindowY(0)=200, WindowWidth(0)=195, WindowHeight(0)=260
(max) WindowX(0)=-3, WindowY(0)=-3, WindowWidth(0)=1366, WindowHeight(0)=716
(normal) WindowX(0)=100, WindowY(0)=200, WindowWidth(0)=195, WindowHeight(0)=260




