Is menu open

How to check if a menu is dropped down or not.

type

  TForm1 = class(TForm)

  ...

private

  IsMenuOpen: Boolean;

  procedure WMMENUSELECT(var message: TWMMENUSELECT); message WM_MENUSELECT;



procedure TForm1.WMMENUSELECT(var message: TWMMENUSELECT);

begin

  inherited;

  IsMenuOpen := not ((message.MenuFlag and $FFFF > 0) and (message.Menu = 0));

end;

 

Share this article!

Follow us!

Find more helpful articles: