If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) TextGadget(1,10,10,400,20,"Drücken Sie die rechte Maustaste, um das Popup-Menü zu öffnen.",0) If CreatePopupMenu(1) For a=1 To 5 MenuItem(a,"Item "+Str(a)) Next AppendMenu_(MenuID(1),#MF_MENUBARBREAK,6,"Item 6") For a=7 To 10 MenuItem(a,"Item "+Str(a)) Next EndIf Repeat EventID=WaitWindowEvent() Select EventID Case #WM_RBUTTONDOWN DisplayPopupMenu(1,WindowID(0)) EndSelect If EventID=#PB_Event_CloseWindow Quit=1 EndIf Until Quit=1 EndIf