'Example of using the Windows title bar context menu GUI "Form1",PIXELS CONST IDM_SECRETMENU = 0x9990 'must be less than 0xF000 GLOBAL Form1 AS HWND GLOBAL hStc1 AS CONTROL SUB FORMLOAD() Form1 = BCX_FORM("Form1", 0, 0, 514, 110) hStc1 = BCX_LABEL("Right Click the title bar to show the new 'Secret' menu item " ,Form1,0, 90, 20, 320, 32) 'Add to the system context Menu Add2SysMenu(Form1) CENTER(Form1) SHOW(Form1) END SUB BEGIN EVENTS SELECT CASE CBMSG CASE WM_SYSCOMMAND IF CBCTL = IDM_SECRETMENU THEN MSGBOX "You called 'My secret menu item'","Secret menu" END IF END SELECT END EVENTS FUNCTION Add2SysMenu(hwndOwner AS HWND) AS BOOL Dim SysMenu as HMENU SysMenu = GetSystemMenu(hwndOwner,FALSE) AppendMenu(SysMenu,MF_SEPARATOR,0,0) AppendMenu(SysMenu,MF_STRING, IDM_SECRETMENU, "My Secret menu item") FUNCTION=TRUE END FUNCTION