Procedure ListWindows(hwnd,Param) If GetWindowLongPtr_(hwnd,#GWL_EXSTYLE) ! #WS_EX_TOOLWINDOW And GetWindowLongPtr_(hwnd,#GWL_STYLE) & #WS_VISIBLE String$ = Space(250) GetWindowText_(hwnd,String$,250) If Not String$="" AddGadgetItem(1,-1,String$,0,0) EndIf EndIf ProcedureReturn #True EndProcedure If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ListViewGadget(1,10,10,480,230,0) EnumChildWindows_(FindWindow_("ToolbarWindow32",#Null),@ListWindows(),0) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf