
Code: Select all
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
Import ""
CompilerElse
ImportC ""
CompilerEndIf
PB_Window_Objects.i
PB_Object_Count( Object )
EndImport
Procedure IsWindowClose( Window = #PB_All )
If Window = #PB_All
ProcedureReturn PB_Object_Count( PB_Window_Objects.i )
EndIf
ProcedureReturn IsWindow( Window )
EndProcedure
CompilerIf #PB_Compiler_IsMainFile
OpenWindow(1, 0, 0, 322, 150, "window 1", #PB_Window_SystemMenu )
OpenWindow(2, 0, 230, 322, 150, "window 2", #PB_Window_SystemMenu )
OpenWindow(3, 0, 460, 322, 150, "window 3", #PB_Window_SystemMenu )
OpenWindow(4, 0, 0, 322, 150, "window 4", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
While IsWindowClose( 4 )
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
CloseWindow( EventWindow() )
EndSelect
Wend
CompilerEndIf