Hi Hazael,
Warning: this is a complete shot in the dark! but comparing the _o_ceans project implementation with Harbour's, the following 'rather corresponding' code is in use with the _o_ceans project
METHOD Execute() CLASS HBMenuSys
LOCAL oNewMenu := ::oMenu:getItem( ::oMenu:current )
LOCAL lPas := .T.
LOCAL current := 0 // <- added
// Execute the Data block if selected MenuItem is ! IsPopUp:
IF HB_ISOBJECT( oNewMenu ) .AND. ! oNewMenu:IsPopUp
IF IS_IN( ::oMenu:ClassName(), "TOPBARMENU|POPUPMENU|HB_POPUPMENU" )
SetPos( ::nOldRow, ::nOldCol )
SetCursor( ::nOldCursor )
Eval( oNewMenu:data, oNewMenu )
SetCursor( SC_NONE )
lPas := .F.
ENDIF
// Pop the Menu:
IF popMenu() // <- added
current := ::oMenu:current // <- added
ENDIF // <- added
::oMenu:select( current ) // <- changed
// Display newly selected current menu item:
IF IS_IN( ::oMenu:ClassName(), "POPUPMENU|HB_POPUPMENU" ) .AND. ;
::nMenuLevel == 1 .AND. ;
! ::oMenu:isOpen
::oMenu:open()
ENDIF
IF lPas
::oMenu:close()
SetPos( ::nOldRow, ::nOldCol )
SetCursor( ::nOldCursor )
Eval( oNewMenu:data, oNewMenu )
SetCursor( SC_NONE )
ENDIF
RETURN oNewMenu:Id
ENDIF
RETURN 0
Beware: this code is completely _untested_ with Harbour
frank
Op woensdag 20 november 2019 21:34:14 UTC+1 schreef Hazael: