I try to run this in a timer:
Application.Minimize;
ShowWindow( Application.handle, SW_HIDE );
It was in the code forever, and we just found that it does not work, when you have popupmenu active, it does not minimize the MDI parent window.
I believe that if I close the popup menu before running this code, then everything will be fine. The problem is that this code is in MDI Parent, and I have no idea where the current popup menu is. It does not matter if it is part of another form toolbar, it creates a toolbar, a right-click product or a seemingly meaningless key next to a space.
So, is there a way to hide the active popup menu in my entire program?
Also, if there is a better piece of code than what I use to minimize what will circumvent this problem, this will also be awesome information.
source
share