Код:
procedure TForm1.Button1Click(Sender: TObject);
var Wnd : HWND;
begin
Wnd := FindWindow(nil, PChar('Form1'));
if (Wnd <> 0) then
begin
SetMenu(Wnd, 0);
end;
end;
или
Код:
void killmenu()
{
HWND wnd;
wnd = FindWindow(NULL, "Form1");
if (wnd != NULL)
{
SetMenu(wnd, (HMENU)0);
}
}