When closing the main window, why doesn't the child window close like in Windows? This is why there's no visible window and a warning that says "at least one window must be open."
Code: Select all
If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
OpenWindow(1, 200, 250, 195, 160, "Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, WindowID(0))
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_CloseWindow
CloseWindow( EventWindow())
; Quit = 1
EndIf
Until Quit = 1
EndIf
End 