Code: Select all
SystemParametersInfo_(#SPI_GETWORKAREA, 0, @DesktopRect.RECT, 0)
DesktopX = DesktopRect\left
DesktopY = DesktopRect\top
DesktopWidth = DesktopRect\right - DesktopRect\left
DesktopHeight = DesktopRect\bottom - DesktopRect\top
DesktopWidth-GetSystemMetrics_(#SM_CXFIXEDFRAME)*2
DesktopHeight-(GetSystemMetrics_(#SM_CYCAPTION)+GetSystemMetrics_(#SM_CYFIXEDFRAME)*2)
OpenWindow(0,DesktopX,DesktopY,DesktopWidth,DesktopHeight,"",#PB_Window_SystemMenu)
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow