LoadImage(1,"Beenden.bmp",0) 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) MenuItem(a,"Test-Item") EndIf SetMenuItemBitmaps_(MenuID(1),0,#MF_BYCOMMAND,ImageID(1),ImageID(1)) Repeat If GetAsyncKeyState_(#VK_RBUTTON)<>0 DisplayPopupMenu(1,WindowID(0)) EndIf Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf