How to close custom positioned PopupMenu in delphi?
问题 I have a project with CoolTrayIcon and PopupMenu with disabled AutoPopup property. I would like to position the PopupMenu and show it for the user. The position is OK but menu doesn't close if the user clicks away or press ESC button. I have not found any property like Active which could help if the menu is used or not. Here I position the menu: procedure TForm1.CoolTrayIcon1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var pnt: TPoint; yy:integer; begin