Im writing an app that has more than one dialog box open (modless and modal). When the user closes the app via the red cross in the top right of the window, how do i close all the windows (some are hidden ( form.hide() ) at the same time and completely exit the app? Some of the hidden boxes are preventing the prog from closing, and form.close() doesnt seem to do it, as there are more than 1.