Mega Code Archive

 
Categories / Delphi / VCL
 

How to check if a TMainMenu is dropped down or not

Title: How to check if a TMainMenu is dropped down or not type TForm1 = class(TForm) // ... private IsMenuOpen: Boolean; procedure WMMENUSELECT(var message: TWMMENUSELECT); message WM_MENUSELECT; end; implementation procedure TForm1.WMMENUSELECT(var message: TWMMENUSELECT); begin inherited; IsMenuOpen := not ((message.MenuFlag and $FFFF = 0) and (message.Menu = 0)); end;