Is there a way of testing whether a frame (suppose I have it as a variable my_frame) is hidden in wxPython? Also, is there a way that I can over-ride the close button so that the frame becomes hidden rather than destroyed, and perform supplementary tests?