Event of popupMenu in clicking outside

To make a workaround, I should switch below property True/False.

App.UseGDIPlus = True

When I ‘mouse down’ on PopupMenu,
I should keep it ‘False’ and then after selecting any item OR
in case I just click other control outside of the PopupMenu, I should keep it ‘True’.

For the first requirement, I use below code and it works.
MouseDown event : App.UseGDIPlus = False
Change event : App.UseGDIPlus = True

However, I am not sure which event or something I can use to detect clicking other control outside of the Popupmenu without choosing any item on it.
In that case, I should keep below code.
App.UseGDIPlus = True

Do you have an idea?

Thanks in advance.

App.UseGDIPlus = True
has no effect on mouse events (or any other events for that matter)… it detemines what graphics options are available, and for WINDOWS only

MouseEvents are detected (usually) by the currently active (ie. Has Focus) control. If this is a pop up menu, and you click OUTSIDE then the Popup will simply close and the focus moves elsewhere

Flipping it back and forth like this is unlikely to have any effect

Thanks for the comments.
I should find another workaround then.