我创建了一个托盘图标,可以正常使用,点击右键打开菜单。问题是如果点击右键后不选择其中一个菜单项进行操作的话,它就总不消失。
SetForegroundWindow(FParentForm.Handle);
GetCursorPos(Point);
IconPopupMenu.Popup(Point.x, Point.y);
你在显示菜单之前,加上第一行代码
SetForegroundWindow(FParentForm.Handle);
GetCursorPos(Point);
IconPopupMenu.Popup(Point.x, Point.y);
你在显示菜单之前,加上第一行代码