#MIM_BACKGROUND=2 Structure MENUINFO cbSize.l fMask.l dwStyle.l cyMax.l hbrBack.l dwContextHelpID.l dwMenuData.l EndStructure MI.MENUINFO\cbSize=SizeOf(MENUINFO) hBrush=CreateSolidBrush_(RGB(255,255,0)) MI\hbrBack=hBrush MI\fMask=#MIM_BACKGROUND 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,"Test-Item "+Str(a)) Next OpenSubMenu("Untermenü") MenuItem(6,"Test-Item") CloseSubMenu() EndIf SetMenuInfo_(MenuID(1),MI) SetMenuInfo_(GetSubMenu_(MenuID(1),5),MI) Repeat If GetAsyncKeyState_(#VK_RBUTTON)<>0 DisplayPopupMenu(1,WindowID(0)) EndIf Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf