Perhaps I found a solution But I not understood if it can go good
On Main.prgOn buttonbar of Main.prgCode: Select all | Expand
DEFINE BUTTON oBtns[1] RESOURCE "paciente" OF ::oBar NOBORDER ;
ACTION TPaziente():New(oItem[1],oBtns[1]):Activar(oItem[1],oBtns[1])
On menu of Main.prgCode: Select all | Expand
MENUITEM oItem[1] PROMPT "Anagrafica pazienti" ACTION TPaziente():New(oItem[1],oBtns[1]):Activar(oItem[1],oBtns[1]) RESOURCE "pazienti"
On TPaziente.prgI don't know if it is right to use Memvar, in clipper I never used them or so I remember
On method New()of Tpaziente
Code: Select all | Expand
IF !Empty(oItem)
oItem:Disable()
ENDIF
IF !Empty(oBtnB)
oBtnB:Disable()
ENDIF
oMOpc:=oItem
oBBar:=oBtnB
on Method activar()Code: Select all | Expand
METHOD Activar(oItem,oBtnB) CLASS TPaziente
ACTIVATE WINDOW ::oWinClients MAXIMIZED ;
VALID (::oWinClients:=Nil,Exit_Wnd(oItem,oBtnB),.T.)
RETURN NIL
Code: Select all | Expand
STAT FUNC Exit_Wnd(oItem,oBtnB)
oBtnB:Enable()
oItem:Enable()
RETURN (.T.)
So, This blocks both the main menu and the buttonbar of main.prg
For Now it seem run ok , I saw this technique on a source code by Alfredo Arteaga which I hope is fine even if I haven't heard from it for years
But there would be a problem.
while in the menu I see the locked option
the button of buttonbar is disabled but not is on different color 
but I check it is disabled
any solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com