ALX
Well-known member
I missed a basic concept here, somehow... My app opens with a form that is the main menu. Let's say form A; which has it's "Shown in Taskbar" property set to TRUE. The user selects an option on form A and opens form B, which also has it's "Shown in Taskbar" property set to TRUE. As form B loads, form A is hidden so that if the user moves or resizes form B then form A will not be visible underneath. This replaces the taskbar button for form A with the one for form B. If the user then closes form B via the taskbar (right-clicking the taskbar button), form A then becomes the active form. I want the app to end if the user closes any windows from the taskbar. I've tried setting up form A to be the only form that's visible in the taskbar, but that makes me lose all taskbar buttons when form A is hidden. The idea is to have the taskbar button represent the app rather than just the currently active form and I don't want multiple forms on the display if the user decides to move things around. Is there a way to tell if a form has been closed via the taskbar? I suppose that I could move Form A around the display to match form B's position (to keep only one form visible at a time) if form B gets moved, but I'm guessing there's a more efficient way to do this.