LoadImage(1,"Beenden.bmp",0) If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) If CreateMenu(0,WindowID(0)) MenuTitle("Programm") MenuItem(1,"Beenden") EndIf SetMenuItemBitmaps_(MenuID(0),1,#MF_BYCOMMAND,ImageID(1),ImageID(1)) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf