VCL Delphi

const
WM_EXITMENULOOP = $212;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
Test1: TMenuItem;
ItemA1: TMenuItem;
ItemB1: TMenuItem;
ItemC1: TMenuItem;
private
{ Private declarations }
procedure WMEnterMenuLoop(VAR Msg: TWMNoParams);
message WM_ENTERMENULOOP;
procedure WMExitMenuLoop(VAR Msg: TWMNoParams);
message WM_EXITMENULOOP;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.WMEnterMenuLoop(VAR Msg: TWMNoParams);
BEGIN
Inherited;
Caption := 'Menu aktif';
END;
procedure TForm1.WMExitMenuLoop(VAR Msg: TWMNoParams);
BEGIN
Inherited;
Caption := 'Menu aktif degil';
END;